I used Gulp to minify my entire js files. Once minified I got an error like the following:
[$injector:unpr] Unknown provider: eProvider <- e <- makeE
Angular doesn't always work well with minification.
If you as an example write this:
angular.controller("MyCtrl", function ($scope) {...});
Then the $scope
would be changed to something meaningless during minification.
If one instead changes that to:
angular.controller("MyCtrl", ["$scope", function (s) {...}]);
Then it doesn't matter what the first argument in the function is called (here s
), as long as the string is "$scope"
.
See this: https://docs.angularjs.org/tutorial/step_05#a-note-on-minification in the documentation for more details.
If you want more help, you have to post the code in question, not just the error.