$injector.invoke calls aren't correctly annotated
See original GitHub issueThe following code which is inside a directive’s link function does not get annotated:
// Compile new element
$injector.invoke(function($compile) {
$compile(myElement)(scope);
});
Previously posted at mzgol/grunt-ng-annotate#15.
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
$injector - AngularJS: API
Overview. $injector is used to retrieve object instances as defined by provider, instantiate types, invoke methods, and load modules.
Read more >[$injector:strictdi] is not using explicit annotation and cannot ...
angularjs - Error: [$injector:strictdi] is not using explicit annotation and cannot be invoked in strict mode - Stack Overflow. Stack Overflow ...
Read more >google/guice - Inject Injector does not work with child ... - GitHub
The testcase below works, if the injector is created by: Guice.createInjector(new ChildModule()); it fails if the injector is created by: ...
Read more >Angulars dependency injection annotation process
First, it calls the toString method on the function - I'm going to recreate the bare basics of this - it won't be...
Read more >Contexts and Dependency Injection - Quarkus
Quarkus DI solution (also called ArC) is based on the Contexts and ... Bean classes that don't have a bean defining annotation are...
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
@levithomason the annotate-only-when-inside-angular-modules is to reduce the risk of false positives. ngInject to the rescue! Try:
$injector.invoke(/*@ngInject*/function($kinvey, ENV) { ... })
.Awesome, still better than manually injecting 😃 Thanks