Tutorial by Examples

Router enables navigation from one view to another based on user interactions with the application. Following are the steps in implementing basic routing in Angular 2 - Basic precaution: Ensure you have the tag <base href='/'> as the first child under your head tag in your index.htm...
Sometimes it makes sense to nest view's or routes within one another. For example on the dashboard you want several sub views, similar to tabs but implemented via the routing system, to show the users' projects, contacts, messages ets. In order to support such scenarios the router allows us to defin...
This example will show you how you can resolve data fetched from a service before rendering your application's view. Uses angular/router 3.0.0-beta.2 at the time of writing users.service.ts ... import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Rx'; import { User ...
Contrary to original documentation, I found this to be the way to properly nest children routes inside the app.routing.ts or app.module.ts file (depending on your preference). This approach works when using either WebPack or SystemJS. The example below shows routes for home, home/counter, and home/...

Page 1 of 1