Skip to content

Commit ce8a752

Browse files
toebupetebacondarwin
authored andcommitted
docs(error/unpr): add hint about using ngStrictDi
The unknown provider error often happens when code is minified and one did not use the correct syntax that supports minification. It's frustrating to have to hunt for a bug in minified code, so adding the simple hint that `ngStrictDi` will tell you what is wrong in the original code will save you quite some trouble. Closes angular#12717
1 parent 5df2e5c commit ce8a752

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/content/error/$injector/unpr.ngdoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ angular.module('myModule', [])
8181
// a scope object cannot be injected into a service.
8282
}]);
8383
```
84+
85+
If you encounter this error only with minified code, consider using `ngStrictDi` (see
86+
{@link ng.directive:ngApp ngApp}) to provoke the error with the non-minified source.

0 commit comments

Comments
 (0)