Updating the Angular 2 Router Step by Step

To update your router from RC4 to RC5, RC6, RC7 and Angular 2 Final.

These are the steps that you’ll need to follow:

  1. Create a separate router configuration file
    1. Remove routes name property
    2. Remove the first / from the path property
    3. Use route redirects instead of useAsDefault
    4. Export your application route configuration
  2. Apply that configuration when bootstrapping your Angular 2 app
  3. Update your [routeLink] directives
  4. Use the new ActivatedRoute service instead of RouteParams
  5. Add a base element inside the <head> your HTML markup