From 6bfd514caf56f49dc51c650f64fdb2c5ab9b6019 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 6 Jul 2016 11:32:42 -0700 Subject: [PATCH] fix(router): remove a circular dep --- modules/@angular/router/src/common_router_providers.ts | 2 +- modules/@angular/router/src/router_config_loader.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/@angular/router/src/common_router_providers.ts b/modules/@angular/router/src/common_router_providers.ts index 4f7f3c3b4a..fa45dfa555 100644 --- a/modules/@angular/router/src/common_router_providers.ts +++ b/modules/@angular/router/src/common_router_providers.ts @@ -11,11 +11,11 @@ import {APP_INITIALIZER, AppModuleFactoryLoader, ApplicationRef, ComponentResolv import {RouterConfig} from './config'; import {Router} from './router'; +import {ROUTER_CONFIG} from './router_config_loader'; import {RouterOutletMap} from './router_outlet_map'; import {ActivatedRoute} from './router_state'; import {DefaultUrlSerializer, UrlSerializer} from './url_tree'; -export const ROUTER_CONFIG = new OpaqueToken('ROUTER_CONFIG'); export const ROUTER_OPTIONS = new OpaqueToken('ROUTER_OPTIONS'); /** diff --git a/modules/@angular/router/src/router_config_loader.ts b/modules/@angular/router/src/router_config_loader.ts index 67e0b97879..51903eeaf7 100644 --- a/modules/@angular/router/src/router_config_loader.ts +++ b/modules/@angular/router/src/router_config_loader.ts @@ -6,13 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import {AppModuleFactoryLoader, AppModuleRef, ComponentFactoryResolver} from '@angular/core'; +import {AppModuleFactoryLoader, AppModuleRef, ComponentFactoryResolver, OpaqueToken} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {fromPromise} from 'rxjs/observable/fromPromise'; -import {ROUTER_CONFIG} from './common_router_providers'; import {Route} from './config'; +export const ROUTER_CONFIG = new OpaqueToken('ROUTER_CONFIG'); + export class LoadedRouterConfig { constructor(public routes: Route[], public factoryResolver: ComponentFactoryResolver) {} }