I'm learning the new framework Angular2 from Google through those videos tutorials on Youtube : https://www.youtube.com/watch?v=SEM6-TkuOgo
I encounter different kind of errors when I started to learn about Services such as:
EXCEPTION: Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable.
EXCEPTION: Error: Uncaught (in promise): Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable.
angular2-polyfills.js:469 Unhandled Promise rejection: Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable. ; Zone: angular ; Task: Promise.then ; Value:
NoAnnotationError {message: "Cannot resolve all parameters for 'ContactListComp…ntactListComponent' is decorated with Injectable.", stack: "Error: Cannot resolve all parameters for 'ContactL…node_modules/angular2/bundles/angular2.js:477:94)"} message : "Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable." stack : "Error: Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated/
angular2-polyfills.js:471 Error: Uncaught (in promise): Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable.(…)
angular2-polyfills.js:469 Unhandled Promise rejection: Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable. ; Zone: ; Task: Promise.then ; Value: NoAnnotationError {message: "Cannot resolve all parameters for 'ContactListComp…ntactListComponent' is decorated with Injectable.", stack: "Error: Cannot resolve all parameters for 'ContactL…node_modules/angular2/bundles/angular2.js:477:94)"}
angular2-polyfills.js:471 Error: Uncaught (in promise): Cannot resolve all parameters for 'ContactListComponent'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'ContactListComponent' is decorated with Injectable.(…)
I don't understand what the console really means I tried to comment some part of the code to test to check when my code compile or not.
If feel that the problem might be around this part in the contact-list.component.ts:
constructor(private _contactService: ContactService) {}
And this one too in the contact.service.ts:
return Promise.resolve(CONTACTS);
I took screenshot of the different TypeScript files in the project: http://imgur.com/a/mqb5P
If someone has some clue to debug this code I'm all ears! :)
PS: I can copy/paste the code from the screenshot if this might help.