You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been having some trouble getting DI to work with my Angular application. I've poked around in the debugger and am unsure how to proceed. Most of the information I can find online about Can't resolve all parameters for My{Component/Directive/Pipe/etc}: (?) is older, and it appears to refer specifically to the deprecated JIT template compiler.
It looks like the official ng test CLI integration uses @angular-devkit/build-angular, but that plugin seems to check if it's been launched via the ng CLI and fail if not. Is there another way to use the AOT / "Ivy" template engine with karma-typescript? Have you looked at possibly integrating it yourself?
ETA: the DI problems were due to a missing core-js/reflect import, not sure if AOT would have actually helped. That said, I'd be interested in an answer to the question regardless, and per my comment below it could fix another problem I'm having.
The text was updated successfully, but these errors were encountered:
I have a follow up to this question. The details are at ngneat/spectator#481 but the short version is that I think JIT is breaking @ngneat/spectator, which is a helper library for creating test harnesses for Angular components and directives. There's a repro linked from that discussion.
The Spectator maintainer is saying he doesn't know much about karma-typescript and punted to you, but I'm worried this is going to require deep knowledge of Angular JIT/testbed internals, so I'm not sure it's really on you either.
I've been having some trouble getting DI to work with my Angular application. I've poked around in the debugger and am unsure how to proceed. Most of the information I can find online about
Can't resolve all parameters for My{Component/Directive/Pipe/etc}: (?)
is older, and it appears to refer specifically to the deprecated JIT template compiler.It looks like the official
ng test
CLI integration uses@angular-devkit/build-angular
, but that plugin seems to check if it's been launched via theng
CLI and fail if not. Is there another way to use the AOT / "Ivy" template engine with karma-typescript? Have you looked at possibly integrating it yourself?ETA: the DI problems were due to a missing
core-js/reflect
import, not sure if AOT would have actually helped. That said, I'd be interested in an answer to the question regardless, and per my comment below it could fix another problem I'm having.The text was updated successfully, but these errors were encountered: