Help Angular by taking a 1 minute survey!Go to surveyHome

RouterUpgradeInitializer

Creates an initializer that in addition to setting up the Angular router sets up the ngRoute integration.

See more...

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

Description

@NgModule({ imports: [ RouterModule.forRoot(SOME_ROUTES), UpgradeModule ], providers: [ RouterUpgradeInitializer ] }) export class AppModule { ngDoBootstrap() {} }
      
      
  1. @NgModule({
  2. imports: [
  3. RouterModule.forRoot(SOME_ROUTES),
  4. UpgradeModule
  5. ],
  6. providers: [
  7. RouterUpgradeInitializer
  8. ]
  9. })
  10. export class AppModule {
  11. ngDoBootstrap() {}
  12. }