Closed RichLinnell closed 8 years ago
Damn, now I get it. I'm afraid you are reading a VERY early edition of the book. The code you refer belongs to chapter 5 in the current edition and is now completely different in order to take full advantage of the DI layer.
Would you please check wether the book os named "Angular 2 Essentials"? If so, please refer to Packt with a proof of purchase and request a replacement.
Packt released that book by mistake and the codebase has dramatically changed ever since. The actual name of the book is "Learning Angular 2" and is up to date with Angular 2 RC.1 (although it should compile seamlessly up to RC.3).
In the meantime, please refer to the code examples in this repository.
In reading the book on Safari Books Online. You may need to let them know.
Hopefully I'm not learning the wrong stuff!
Rich. On Sun, 14 Aug 2016 at 13:25, Pablo Deeleman notifications@github.com wrote:
Damn, now I get it. I'm afraid you are reading a VERY early edition of the book. The code you refer belongs to chapter 5 in the current edition and is now completely different in order to take full advantage of the DI layer.
Would you please check wether the book os named "Angular 2 Essentials"? If so, please refer to Packt with a proof of purchase and request a replacement.
Packt released that book by mistake and the codebase has dramatically changed ever since. The actual name of the book is "Learning Angular 2" and is up to date with Angular 2 RC.1 (although it should compile seamlessly up to RC.3).
In the meantime, please refer to the code examples in this repository.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deeleman/learning-angular2/issues/31#issuecomment-239670944, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMdldBBETZLBue7QbkVt4YCafyBW3lRks5qfwk8gaJpZM4JejJG .
What is the book name on the frontcover?
This is the one I'm reading.
On Sun, 14 Aug 2016 at 14:14, Pablo Deeleman notifications@github.com wrote:
What is the book name on the frontcover?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deeleman/learning-angular2/issues/31#issuecomment-239672870, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMdlYAKH3-eXPrWzQjbLu2USluN5ZdJks5qfxSggaJpZM4JejJG .
In the Component definition the code reads as follows
Firstly, the
TaskService
is defined asclass TaskService
so the first line of the constructor should readconst TasksService: TaskService = new TaskService();
Secondly, if we are going to call the const TasksService then the second line should read
this.tasks = TasksService.taskStore;