1- import { CONST , Type } from 'angular2/src/core/facade/lang' ;
1+ import { CONST , Type , isPresent } from 'angular2/src/core/facade/lang' ;
22import { RouteDefinition } from './route_definition' ;
33export { RouteDefinition } from './route_definition' ;
44
@@ -18,7 +18,7 @@ export class RouteConfig {
1818 * It has the following properties:
1919 * - `path` is a string that uses the route matcher DSL.
2020 * - `component` a component type.
21- * - `as ` is an optional `CamelCase` string representing the name of the route.
21+ * - `name ` is an optional `CamelCase` string representing the name of the route.
2222 * - `data` is an optional property of any type representing arbitrary route metadata for the given
2323 * route. It is injectable via {@link RouteData}.
2424 *
@@ -27,7 +27,7 @@ export class RouteConfig {
2727 * import {RouteConfig} from 'angular2/router';
2828 *
2929 * @RouteConfig ([
30- * {path: '/home', component: HomeCmp, as : 'HomeCmp' }
30+ * {path: '/home', component: HomeCmp, name : 'HomeCmp' }
3131 * ])
3232 * class MyApp {}
3333 * ```
@@ -37,15 +37,15 @@ export class Route implements RouteDefinition {
3737 data : { [ key : string ] : any } ;
3838 path : string ;
3939 component : Type ;
40- as : string ;
40+ name : string ;
4141 // added next two properties to work around https://github.com/Microsoft/TypeScript/issues/4107
4242 loader : Function ;
4343 redirectTo : string ;
44- constructor ( { path, component, as ,
45- data} : { path : string , component : Type , as ?: string , data ?: { [ key : string ] : any } } ) {
44+ constructor ( { path, component, name ,
45+ data} : { path : string , component : Type , name ?: string , data ?: { [ key : string ] : any } } ) {
4646 this . path = path ;
4747 this . component = component ;
48- this . as = as ;
48+ this . name = name ;
4949 this . loader = null ;
5050 this . redirectTo = null ;
5151 this . data = data ;
@@ -58,7 +58,7 @@ export class Route implements RouteDefinition {
5858 * It takes an object with the following properties:
5959 * - `path` is a string that uses the route matcher DSL.
6060 * - `component` a component type.
61- * - `as ` is an optional `CamelCase` string representing the name of the route.
61+ * - `name ` is an optional `CamelCase` string representing the name of the route.
6262 * - `data` is an optional property of any type representing arbitrary route metadata for the given
6363 * route. It is injectable via {@link RouteData}.
6464 *
@@ -77,14 +77,14 @@ export class AuxRoute implements RouteDefinition {
7777 data : { [ key : string ] : any } = null ;
7878 path : string ;
7979 component : Type ;
80- as : string ;
80+ name : string ;
8181 // added next two properties to work around https://github.com/Microsoft/TypeScript/issues/4107
8282 loader : Function = null ;
8383 redirectTo : string = null ;
84- constructor ( { path, component, as } : { path : string , component : Type , as ?: string } ) {
84+ constructor ( { path, component, name } : { path : string , component : Type , name ?: string } ) {
8585 this . path = path ;
8686 this . component = component ;
87- this . as = as ;
87+ this . name = name ;
8888 }
8989}
9090
@@ -95,7 +95,7 @@ export class AuxRoute implements RouteDefinition {
9595 * It has the following properties:
9696 * - `path` is a string that uses the route matcher DSL.
9797 * - `loader` is a function that returns a promise that resolves to a component.
98- * - `as ` is an optional `CamelCase` string representing the name of the route.
98+ * - `name ` is an optional `CamelCase` string representing the name of the route.
9999 * - `data` is an optional property of any type representing arbitrary route metadata for the given
100100 * route. It is injectable via {@link RouteData}.
101101 *
@@ -104,7 +104,7 @@ export class AuxRoute implements RouteDefinition {
104104 * import {RouteConfig} from 'angular2/router';
105105 *
106106 * @RouteConfig ([
107- * {path: '/home', loader: () => Promise.resolve(MyLoadedCmp), as : 'MyLoadedCmp'}
107+ * {path: '/home', loader: () => Promise.resolve(MyLoadedCmp), name : 'MyLoadedCmp'}
108108 * ])
109109 * class MyApp {}
110110 * ```
@@ -114,12 +114,12 @@ export class AsyncRoute implements RouteDefinition {
114114 data : { [ key : string ] : any } ;
115115 path : string ;
116116 loader : Function ;
117- as : string ;
118- constructor ( { path, loader, as ,
119- data } : { path : string , loader : Function , as ?: string , data ?: { [ key : string ] : any } } ) {
117+ name : string ;
118+ constructor ( { path, loader, name , data } :
119+ { path : string , loader : Function , name ?: string , data ?: { [ key : string ] : any } } ) {
120120 this . path = path ;
121121 this . loader = loader ;
122- this . as = as ;
122+ this . name = name ;
123123 this . data = data ;
124124 }
125125}
@@ -147,7 +147,7 @@ export class AsyncRoute implements RouteDefinition {
147147export class Redirect implements RouteDefinition {
148148 path : string ;
149149 redirectTo : string ;
150- as : string = null ;
150+ name : string = null ;
151151 // added next property to work around https://github.com/Microsoft/TypeScript/issues/4107
152152 loader : Function = null ;
153153 data : any = null ;
0 commit comments