deeleman / learning-angular2

Code samples repository for the examples provided in "Learning Angular 2", published by Packt Publishing - THE BOOK COVERS UP TO RC.1 and hence is severely OUTDATED. PLEASE REFER TO THE LATEST EDITIONS INSTEAD.
https://www.packtpub.com/web-development/learning-angular-2
108 stars 59 forks source link

Chapter 7 Section 3 - Navigation changed #36

Closed RichLinnell closed 8 years ago

RichLinnell commented 8 years ago

the first code change in this section made to the task.component.ts adds the index parameter to the route, but the route seems to have also been changed to

this.router.navigate(['Timer', { id: index }]);

This is inconsistent with the end of the previous section where the route was defined as

this.router.navigate(['TimerComponent']);

Immediately afterwards you go to the route definition and show it as follows, confirming the inconsistency

{ path: 'timer/:id', name: 'TimerComponent', component: TimerComponent}

deeleman commented 8 years ago

Good catch, thank you so much!