When I\'m loading the minified (through UglifyJS) version of my AngularJS application, I get the following error in the console:
Unknown provider: aProvider
I just had the same problem and resolved it by simply replacing ngmin (now deprecated) with ng-annotate for my grunt build task.
It seems that yeoman angular has also been updated to use ng-annotate as of this commit: https://github.com/yeoman/generator-angular/commit/3eea4cbeb010eeaaf797c17604b4a3ab5371eccb
However if you are using an older version of yeoman angular like me, just replace ng-min with ng-annotate in your package.json:
- "grunt-ngmin": "^0.0.3",
+ "grunt-ng-annotate": "^0.3.0",
run npm install (then optionally npm prune), and follow the changes in the commit to edit Gruntfile.js.