Revert "refactor(router): move ROUTE_DATA token into own file"

This reverts commit 78a8ba2307.
This commit is contained in:
Victor Berchet 2015-08-20 08:06:24 -07:00
parent 298f1fb6a6
commit abb3bd266b
5 changed files with 13 additions and 8 deletions

View File

@ -22,7 +22,6 @@ export {CanActivate} from './src/router/lifecycle_annotations';
export {Instruction, ComponentInstruction} from './src/router/instruction'; export {Instruction, ComponentInstruction} from './src/router/instruction';
export {Url} from './src/router/url_parser'; export {Url} from './src/router/url_parser';
export {OpaqueToken, Type} from 'angular2/angular2'; export {OpaqueToken, Type} from 'angular2/angular2';
export {ROUTE_DATA} from './src/router/route_data';
import {LocationStrategy} from './src/router/location_strategy'; import {LocationStrategy} from './src/router/location_strategy';
import {HTML5LocationStrategy} from './src/router/html5_location_strategy'; import {HTML5LocationStrategy} from './src/router/html5_location_strategy';

View File

@ -2,6 +2,13 @@ import {RouteConfig as RouteConfigAnnotation, RouteDefinition} from './route_con
import {makeDecorator} from 'angular2/src/util/decorators'; import {makeDecorator} from 'angular2/src/util/decorators';
import {List} from 'angular2/src/facade/collection'; import {List} from 'angular2/src/facade/collection';
export {Route, Redirect, AuxRoute, AsyncRoute, RouteDefinition} from './route_config_impl'; export {
Route,
Redirect,
AuxRoute,
AsyncRoute,
RouteDefinition,
ROUTE_DATA
} from './route_config_impl';
export var RouteConfig: (configs: List<RouteDefinition>) => ClassDecorator = export var RouteConfig: (configs: List<RouteDefinition>) => ClassDecorator =
makeDecorator(RouteConfigAnnotation); makeDecorator(RouteConfigAnnotation);

View File

@ -1,7 +1,10 @@
import {CONST, Type} from 'angular2/src/facade/lang'; import {CONST, CONST_EXPR, Type} from 'angular2/src/facade/lang';
import {List} from 'angular2/src/facade/collection'; import {List} from 'angular2/src/facade/collection';
import {RouteDefinition} from './route_definition'; import {RouteDefinition} from './route_definition';
export {RouteDefinition} from './route_definition'; export {RouteDefinition} from './route_definition';
import {OpaqueToken} from 'angular2/di';
export const ROUTE_DATA: OpaqueToken = CONST_EXPR(new OpaqueToken('routeData'));
/** /**
* You use the RouteConfig annotation to add routes to a component. * You use the RouteConfig annotation to add routes to a component.

View File

@ -1,4 +0,0 @@
import {OpaqueToken} from 'angular2/di';
import {CONST_EXPR} from 'angular2/src/facade/lang';
export const ROUTE_DATA: OpaqueToken = CONST_EXPR(new OpaqueToken('routeData'));

View File

@ -8,7 +8,7 @@ import {Injector, bind, Dependency, UNDEFINED} from 'angular2/di';
import * as routerMod from './router'; import * as routerMod from './router';
import {Instruction, ComponentInstruction, RouteParams} from './instruction'; import {Instruction, ComponentInstruction, RouteParams} from './instruction';
import {ROUTE_DATA} from './route_data'; import {ROUTE_DATA} from './route_config_impl';
import * as hookMod from './lifecycle_annotations'; import * as hookMod from './lifecycle_annotations';
import {hasLifecycleHook} from './route_lifecycle_reflector'; import {hasLifecycleHook} from './route_lifecycle_reflector';