Hi,
When you import the appModule, you are importing all the exported properties of the appModule.
Do you have your testComponent in the exports array of the appModule ?
Yes I export it.. TestComponent extend another class and that class is using Injector to get service without using constructor.. The error happens at: AppModule.Injector.get(TestService) this line, said Cannot read property 'get' of undefined.
I create a question of this on stackoverflow, stackoverflow.com/questions/588577...
Maybe you could help give some advice. Thanks tons. : )
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
When you import the appModule, you are importing all the exported properties of the appModule.
Do you have your testComponent in the exports array of the appModule ?
Yes I export it.. TestComponent extend another class and that class is using Injector to get service without using constructor.. The error happens at: AppModule.Injector.get(TestService) this line, said Cannot read property 'get' of undefined.
I create a question of this on stackoverflow, stackoverflow.com/questions/588577...
Maybe you could help give some advice. Thanks tons. : )