routerProvidersHash top-level constant
The main Router providers when using hash routing.
The routerProvidersHash should be added to the app's root injector.
@GenerateInjector([routerProvidersHash])
final InjectorFactory appInjector = ng.appInjector$Injector;
...
runApp(ng.MyAppComponentNgFactory, createInjector: appInjector);
Implementation
const routerProvidersHash = [
ClassProvider(LocationStrategy, useClass: HashLocationStrategy),
ClassProvider(PlatformLocation, useClass: BrowserPlatformLocation),
ClassProvider(Location),
ClassProvider(Router, useClass: RouterImpl)
];