{ "id": "api/router/upgrade/RouterUpgradeInitializer", "title": "RouterUpgradeInitializer", "contents": "\n\n
\n
\n
\n \n API > @angular/router > @angular/router/upgrade\n
\n \n
\n \n
\n

RouterUpgradeInitializerlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

Creates an initializer that sets up ngRoute integration\nalong with setting up the Angular router.

\n\n \n
\n \n \n \n \n const RouterUpgradeInitializer: { provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>; multi: boolean; useFactory: (ngUpgrade: UpgradeModule) => () => void; deps: (typeof UpgradeModule)[]; };\n \n\n \n\n \n \n\n \n
\n

Usage noteslink

\n \n@NgModule({\n imports: [\n RouterModule.forRoot(SOME_ROUTES),\n UpgradeModule\n],\nproviders: [\n RouterUpgradeInitializer\n]\n})\nexport class AppModule {\n ngDoBootstrap() {}\n}\n\n\n
\n\n\n\n
\n
\n\n\n" }