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): ` +