Closed RichLinnell closed 8 years ago
Please check if there's any inconsistency between your code and these two lines at tasks.component.html
No, those lines are good, it's the following line in app.component.html
that is causing the issue
<li><a [routerLink]="['TimerComponent']">Timer</a></li>
if I change it to this, then all is good (sort of)
<li><a [routerLink]="['TimerComponent', {id: 0}]">Timer</a></li>
There is no id identifier in app.component.html. In app.component.ts the RouteConfig for the timer should be
{ path: 'timer/:id', name: 'TimerComponent', component: TimerComponent //create page 203 }
There is no id identifier in app.component.html. In app.component.ts the RouteConfig for the timer should be
{ path: 'timer/:id', name: 'TimerComponent', component: TimerComponent //create page 203 }
This piece of code is outdated now that Angular 2 Final contains Router 3.0. For the record, and since providing support for outdated code is pointless, I am working on an updated version of the code, fully compliant with Angular 2 Final.
Closing this issue in the meantime. Feel free to post further comments if required.
Once I have made the initial set of changes to add the index to the timer route, you say refresh and see the link being passed, but actually the whole app fails with
EXCEPTION: Error in app/app.component.html:7:10
browser_adapter.ts:78 ORIGINAL EXCEPTION: Route generator for 'id' was not included in parameters passed.
I have to remove the link to the timer from the main menu to get it to load again.