ngbp/ng-boilerplate — pull request #202 by PaulL1 (2013-11-24 20:50:08+00:00)
Title: Test case for uglify

Looks to me like the http interceptor is causing it in my case. I don't have time this morning before work to look through and understand what might be causing it about this interceptor, but I reckon it'll be the format I've used for declaring something - I copied this logic off some random web page, and it always worked so I never went back to look more closely at it.

In case you don't feel like pulling the whole thing, the relevant module is:

```
/**
* Authentication module, redirects to homepage if not logged in
*/

angular.module('common.authentication', [
])

.config(function( $httpProvider ){
// Intercepts every http request. If the response is success, pass it through. If the response is an
// error, and that error is 401 (unauthorised) then the user isn't logged in, redirect to the login page
var interceptor = function( $q, $rootScope ) {
return {
'responseError': function(rejection) {
if ( rejection.status == 401 ) {
$rootScope.$broadcast('event:unauthorized');

return $q.reject(rejection);
}
return $q.reject(rejection);
}
};
};
$httpProvider.interceptors.push(interceptor);
})
;
```

And the error I get when running it after uglification is:

```
Uncaught Error: [$injector:unpr] Unknown provider: aProvider <- a <- $http <- $compile
```