{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/2246","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/2246/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/2246/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/2246/events","html_url":"https://github.com/angular-ui/bootstrap/issues/2246","id":34151993,"number":2246,"title":"Uglify fails - Unknown provider: aProvider <- a","user":{"login":"mastix","id":1812978,"avatar_url":"https://avatars.githubusercontent.com/u/1812978?v=3","gravatar_id":"","url":"https://api.github.com/users/mastix","html_url":"https://github.com/mastix","followers_url":"https://api.github.com/users/mastix/followers","following_url":"https://api.github.com/users/mastix/following{/other_user}","gists_url":"https://api.github.com/users/mastix/gists{/gist_id}","starred_url":"https://api.github.com/users/mastix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mastix/subscriptions","organizations_url":"https://api.github.com/users/mastix/orgs","repos_url":"https://api.github.com/users/mastix/repos","events_url":"https://api.github.com/users/mastix/events{/privacy}","received_events_url":"https://api.github.com/users/mastix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/type:%20build","name":"type: build","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2014-05-23T07:36:12Z","updated_at":"2015-06-25T11:17:53Z","closed_at":"2014-05-23T11:18:37Z","body":"Hi guys,\r\n\r\nI ran into an issue yesterday when I've added the angular-bootstrap JS to my project (which has been set up using the Yeoman Angular Generator) and then it failed due to uglification. \r\n\r\nI've added the lib via bower (uncompressed!) and it got included into the vendor.js for concatination and minification.\r\n\r\nWhen the file (_ui-bootstrap-tpls.js_; uncompressed) is concatenated and bundled in one big vendor.js, everything looks fine,  but as soon as the uglify task kicks in (with mangle: true = default), this fails (although the grunt ngmin task should rewrite the code to use Angular's inline annotation method):\r\n\r\nThe error message was pretty much this one:\r\n\r\n```javascript\r\nError: [$injector:unpr] Unknown provider: aProvider <- a\r\n```\r\n\r\nPretty much like this bug: https://github.com/yeoman/generator-angular/issues/378\r\n\r\nIs this a bug in the angular-bootstrap code and how it's implemented? \r\nDoes anybody have an idea why this is happening and how it can be fixed (without turning mangle off)?\r\n\r\nJust a hint would be cool! :+1: \r\n\r\nI've set _mangle_ to _false_ in the uglify.js code... and everything works fine, but I'd really like to turn it back to true again. :)\r\n\r\nRegards,\r\n\r\nmastix"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/115213157","html_url":"https://github.com/angular-ui/bootstrap/issues/2246#issuecomment-115213157","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/2246","id":115213157,"user":{"login":"aendrew","id":185041,"avatar_url":"https://avatars.githubusercontent.com/u/185041?v=3","gravatar_id":"","url":"https://api.github.com/users/aendrew","html_url":"https://github.com/aendrew","followers_url":"https://api.github.com/users/aendrew/followers","following_url":"https://api.github.com/users/aendrew/following{/other_user}","gists_url":"https://api.github.com/users/aendrew/gists{/gist_id}","starred_url":"https://api.github.com/users/aendrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aendrew/subscriptions","organizations_url":"https://api.github.com/users/aendrew/orgs","repos_url":"https://api.github.com/users/aendrew/repos","events_url":"https://api.github.com/users/aendrew/events{/privacy}","received_events_url":"https://api.github.com/users/aendrew/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T11:17:53Z","updated_at":"2015-06-25T11:17:53Z","body":"I thought this issue was a thing of the past with ngAnnotate so was really confused when I ran into it again recently. Seems I removed the array syntax from a ui-router resolve — which ngAnnotate doesn't handle. From the Yeoman `generator-angular` Gruntfile:\r\n\r\n> ngmin tries to make the code safe for minification automatically by using the Angular long form for dependency injection. It doesn't work on things like resolve or inject so those have to be done manually.\r\n"}}