2.0.0-alpha.36 (2015-08-31)
routerInjectables been renamed ROUTER_BINDINGS
2.0.0-alpha.41 (2015-10-13)
ROUTER_BINDINGS been renamed ROUTER_PROVIDERS
USE ROUTER_PROVIDERS
ROUTER_PROVIDERS used to simplify the initial boot of the router.
It includes:
RouterRegistry - collection of registered routesLocationStrategy = PathLocationStrategy - LocationStrategy = PathLocationStrategy Matching
ROUTER_PROVIDERS provides "normal" defaults and should be used unless you need another LocationStrategy route.
Edit:
bootstrap(DashboardAppComponent);
To:
bootstrap(DashboardAppComponent, [ ROUTER_PROVIDERS ]);
Sources:
2.0.0-alpha.38 (2015-10-03)
Route attributes must be CamelCase (technically PascalCase)
Note: this was already mentioned in Pardeep's answer under No. 3
If you want to include a route link in your template via router-link , you must make sure that the alias (i.e. the name property) of the route is PascalCase.
If you are using a router-link usage plan, change the route to:
{ path: '/employees', component: EmployeesComponent, name: 'Employees'}
Then you can add the link to your template with:
<a [router-link]="['/Employees']">Employees Link</a>
RouterLink dynamically inserts an href that matches the route path.
Note. When reading the / pr problem, this change was made to prevent users from confusing the <route-link> binding with the <route-link> URL
Sources:
Tip:
If you want to simplify view directives, use ROUTER_DIRECTIVES
It includes:
Update:
In the near future, RouterOutlet / <router-outlet> will be renamed to RouterViewport / <router-viewport>
Source:
Update 2:
- The
RouteConfig as property has been renamed to name
Source: