填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

RouterUpgradeInitializer

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

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)[]; };
    

使用说明

@NgModule({ imports: [ RouterModule.forRoot(SOME_ROUTES), UpgradeModule ], providers: [ RouterUpgradeInitializer ] }) export class AppModule { ngDoBootstrap() {} }
      
      @NgModule({
 imports: [
  RouterModule.forRoot(SOME_ROUTES),
  UpgradeModule
],
providers: [
  RouterUpgradeInitializer
]
})
export class AppModule {
  ngDoBootstrap() {}
}