Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[angular2-transform] Possible to use Ivy (AOT) engine? #492

Open
thw0rted opened this issue Aug 20, 2021 · 1 comment
Open

[angular2-transform] Possible to use Ivy (AOT) engine? #492

thw0rted opened this issue Aug 20, 2021 · 1 comment

Comments

@thw0rted
Copy link

thw0rted commented Aug 20, 2021

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.

@thw0rted
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant