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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
injector=angular.injector(['ng'],true);// true means use strict-difunctionfoo($rootScope){}injector.invoke(foo);// correctly throws Error: [$injector:strictdi] injector.instantiate(foo);// correctly throws Error: [$injector:strictdi] injector.annotate(foo);// ["$rootScope"]
In the last example, I also expected an Error: [$injector:strictdi] but this option is just ignored and the function is annotated.
Using injector.annotate(foo, true); make the error threw, but in this case we are duplicating the option, and also there is situations where annotate is being used by some third party library and we cannot control this.