question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: inject() must be called from an injection context (v9-rc0)

See original GitHub issue

Describe 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:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
frct1commented, Nov 12, 2019

Hi @devoto13 Tested it, now errors doesn’t throwing. Works like a charm 👍 Thank you for fix and have a good day 😃

1reaction
devoto13commented, Nov 11, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found