Error: inject() must be called from an injection context (v9-rc0)
See original GitHub issueDescribe the problem
In angular 9 rc0 fa-layers-counter calling error
ERROR Error: inject() must be called from an injection context
After migration from v8
What did you expect?
Usual rendering layers-counter with classes
Reproducible test case
As i know stakcblitz not supported angular 9 Simply use code below
<fa-layers>
<fa-icon size="lg" [icon]="['fas', 'server']"></fa-icon>
<fa-layers-counter content="{{(counters$ | async).option}}" [classes]="['fa-custom-counter']">
</fa-layers-counter>
</fa-layers>
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
inject() must be called from an injection context - Stack Overflow
There seems to be an issue when using npm link when consuming the library. Solution: use projects.$name.architect.build.options.
Read more >NG0203: `inject()` must be called from an injection context ...
You see this error when you try to use the inject() function outside of the allowed injection context. The injection context is available...
Read more >Error: "inject() must be called from an injection context" after ...
After running ng serve the app crashes. See error message below. Exception or Error. Error: inject() must be called from an injection context...
Read more >Error: inject() must be called from an injection context | Angular
I am trying to use AngularJS Grid, but getting the error and data does not shows up. I have tried to find solution...
Read more >How do I fix "Inject() must be called from an injection context"?
Turns out, this is an error that sometimes happen when using locally linked libs. I had to enable "preserveSymLinks" in the Angular.json of ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @devoto13 Tested it, now errors doesn’t throwing. Works like a charm 👍 Thank you for fix and have a good day 😃
0.6.0-alpha.0 is now available, which has Angular 9 support. Please give it a try and report back if you experience any issues.