docs(cheatsheet): change as to name in routing section

This commit is contained in:
Felix Itzenplitz 2016-01-24 09:04:46 +01:00 committed by Alex Eagle
parent 29aa6a6c1c
commit 3529ee9973
1 changed files with 6 additions and 6 deletions

View File

@ -10,16 +10,16 @@ Routing and navigation
@cheatsheetItem @cheatsheetItem
syntax(ts): syntax(ts):
`@RouteConfig([ `@RouteConfig([
{ path: '/:myParam', component: MyComponent, as: 'MyCmp' }, { path: '/:myParam', component: MyComponent, name: 'MyCmp' },
{ path: '/staticPath', component: ..., as: ...}, { path: '/staticPath', component: ..., name: ...},
{ path: '/*wildCardParam', component: ..., as: ...} { path: '/*wildCardParam', component: ..., name: ...}
]) ])
class MyComponent() {}`|`@RouteConfig` class MyComponent() {}`|`@RouteConfig`
syntax(js): syntax(js):
`var MyComponent = ng.router.RouteConfig([ `var MyComponent = ng.router.RouteConfig([
{ path: '/:myParam', component: MyComponent, as: 'MyCmp' }, { path: '/:myParam', component: MyComponent, name: 'MyCmp' },
{ path: '/staticPath', component: ..., as: ...}, { path: '/staticPath', component: ..., name: ...},
{ path: '/*wildCardParam', component: ..., as: ...} { path: '/*wildCardParam', component: ..., name: ...}
]).Class({ ]).Class({
constructor: function() {} constructor: function() {}
});`|`ng.router.RouteConfig` });`|`ng.router.RouteConfig`