When I\'m loading the minified (through UglifyJS) version of my AngularJS application, I get the following error in the console:
Unknown provider: aProvider
Oliver Salzburg's write-up was fantastic. Upvoted.
Tip for anyone who might have this error. Mine was simply caused by forgetting to pass in an array for a directive controller:
return {
restrict: "E",
scope: {
},
controller: ExampleDirectiveController,
templateUrl: "template/url/here.html"
};
return {
restrict: "E",
scope: {
},
controller: ["$scope", ExampleDirectiveController],
templateUrl: "template/url/here.html"
};