ASP.NET MVC minifies javascript files when the compilation debug
value is set to "false"
. The angular tutorial includes this note about minification:
Since Angular infers the controller's dependencies from the names of arguments to the controller's constructor function, if you were to minify the JavaScript code for [your] controller, all of its function arguments would be minified as well, and the dependency injector would not be able to identify services correctly.
The most common technique to overcome this problem is inline bracket notation, like:
phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', function($scope, $http) {...}]);
This SO question explains the importance of minification safe syntax: Angularjs minify best practice