Angular "Unknown Provider" error after minification with Grunt Build in Yeoman app Angular "Unknown Provider" error after minification with Grunt Build in Yeoman app angularjs angularjs

Angular "Unknown Provider" error after minification with Grunt Build in Yeoman app


It sounds like the common issue of Angular's reliance on the name of arguments for dependency injection. Make sure when you pass dependencies that you include the dependency names as strings so that Angular will know what to inject after minification (since string values won't be changed in the minification process).

myApp.controller('myCtrl', ['$scope', '$http', function($scope, $http) {}])

From Angular docs: A Note on minification