This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

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: ...;
      
      const RouterUpgradeInitializer: { provide: InjectionToken<((compRef: ComponentRef<any>) => void)[]>; multi: boolean; useFactory: ...;
    

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. }