From b2b47177cd0a65e491731213e6035760fd74513d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Tue, 9 Aug 2016 03:30:25 +0200 Subject: [PATCH] add brandon suggestions --- modules/@angular/docs/cheatsheet/routing.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/@angular/docs/cheatsheet/routing.md b/modules/@angular/docs/cheatsheet/routing.md index a51acc65ae..a1c3508938 100644 --- a/modules/@angular/docs/cheatsheet/routing.md +++ b/modules/@angular/docs/cheatsheet/routing.md @@ -9,7 +9,7 @@ Routing and navigation @cheatsheetItem syntax(ts): -`let routes: Routes = [ +`const routes: Routes = [ { path: '', HomeComponent }, { path: 'path/:routeParam', component: MyComponent }, { path: 'staticPath', component: ... }, @@ -18,7 +18,7 @@ syntax(ts): { path: ..., component: ..., data: { message: 'Custom' } } ]); -provideRouter(routes);`|`Routes` +const routing = RouterModule.forRoot(routes);`|`Routes` syntax(js): `var routes = [ { path: '', HomeComponent }, @@ -29,7 +29,7 @@ syntax(js): { path: ..., component: ..., data: { message: 'Custom' } } ]); -ng.router.provideRouter(routes)`|`ng.router.Routes` +var routing = ng.router.RouterModule.forRoot(routes);`|`ng.router.Routes` syntax(dart): `@RouteConfig(const [ const Route(path: 'path', component: MyComponent, name: 'MyCmp' ), @@ -48,6 +48,7 @@ Marks the location to load the component of the active route. @cheatsheetItem syntax(ts js): ` +