DEV Community

Discussion on: Angular unit testing 101 (with examples)

Collapse
 
likepeach789 profile image
peach777

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. : )