refactor(router): renamed RouterAppModule into RouterModule
This commit is contained in:
parent
7f4954bed6
commit
c43dd5a655
|
@ -14,7 +14,7 @@ export {RouterLinkActive} from './src/directives/router_link_active';
|
|||
export {RouterOutlet} from './src/directives/router_outlet';
|
||||
export {CanActivate, CanDeactivate, Resolve} from './src/interfaces';
|
||||
export {Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router, RoutesRecognized} from './src/router';
|
||||
export {ROUTER_DIRECTIVES, RouterAppModule} from './src/router_app_module';
|
||||
export {ROUTER_DIRECTIVES, RouterModule} from './src/router_module';
|
||||
export {RouterOutletMap} from './src/router_outlet_map';
|
||||
export {provideRouter} from './src/router_providers';
|
||||
export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './src/router_state';
|
||||
|
|
|
@ -80,7 +80,7 @@ export function setupRouterInitializer(injector: Injector) {
|
|||
* bootstrap(AppCmp, [provideRouter(config)]);
|
||||
* ```
|
||||
*
|
||||
* @deprecated use RouterAppModule instead
|
||||
* @deprecated use RouterModule instead
|
||||
*/
|
||||
export function provideRouter(routes: Routes, config: ExtraOptions): any[] {
|
||||
return [
|
||||
|
|
|
@ -32,7 +32,7 @@ export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref,
|
|||
* ### Example
|
||||
*
|
||||
* ```
|
||||
* bootstrap(AppCmp, {modules: [RouterAppModule]});
|
||||
* bootstrap(AppCmp, {modules: [RouterModule]});
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
|
@ -55,7 +55,7 @@ export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref,
|
|||
{provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}}
|
||||
]
|
||||
})
|
||||
export class RouterAppModule {
|
||||
export class RouterModule {
|
||||
constructor(private injector: Injector) {
|
||||
setTimeout(() => {
|
||||
const appRef = injector.get(ApplicationRef);
|
|
@ -9,7 +9,7 @@
|
|||
import {InboxApp, ROUTER_CONFIG} from './app/inbox-app';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
||||
import {provideRoutes, RouterAppModule} from '@angular/router';
|
||||
import {provideRoutes, RouterModule} from '@angular/router';
|
||||
|
||||
export function main() {
|
||||
bootstrap(InboxApp, {
|
||||
|
@ -17,6 +17,6 @@ export function main() {
|
|||
provideRoutes(ROUTER_CONFIG),
|
||||
{provide: LocationStrategy, useClass: HashLocationStrategy}
|
||||
],
|
||||
modules: [RouterAppModule]
|
||||
modules: [RouterModule]
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue