Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

RouterUpgradeInitializer

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

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

Usage notes

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