{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/11836","labels_url":"https://api.github.com/repos/angular/angular.js/issues/11836/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/11836/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/11836/events","html_url":"https://github.com/angular/angular.js/issues/11836","id":74275448,"number":11836,"title":"ngLocale error in publishExternalAPI","user":{"login":"frodegil","id":8426147,"avatar_url":"https://avatars.githubusercontent.com/u/8426147?v=3","gravatar_id":"","url":"https://api.github.com/users/frodegil","html_url":"https://github.com/frodegil","followers_url":"https://api.github.com/users/frodegil/followers","following_url":"https://api.github.com/users/frodegil/following{/other_user}","gists_url":"https://api.github.com/users/frodegil/gists{/gist_id}","starred_url":"https://api.github.com/users/frodegil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frodegil/subscriptions","organizations_url":"https://api.github.com/users/frodegil/orgs","repos_url":"https://api.github.com/users/frodegil/repos","events_url":"https://api.github.com/users/frodegil/events{/privacy}","received_events_url":"https://api.github.com/users/frodegil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-08T08:03:25Z","updated_at":"2015-05-18T16:27:49Z","closed_at":"2015-05-18T16:27:49Z","body":"I'm using version 1.3.15.\r\n`publishExternalAPI(angular)` is called before I declare any new modules (and dependencies). And it seems to use `try...catch` as flow-control when adding the ngLocal module.\r\nThis is a problem because I want Visual Studio to break on javascript exceptions thrown in code.\r\nTherefore I always get the ngLocal error when I refresh my SPA index.html.\r\nThe problem is:\r\n```javascript\r\n  angularModule = setupModuleLoader(window);\r\n  try {\r\n    angularModule('ngLocale');\r\n  } catch (e) {\r\n    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\r\n  }\r\n```\r\nThere might be a reason for the angularjs team to do this that I don't see.\r\nDuring development I've temporarily changed it to:\r\n```javascript\r\n  angularModule = setupModuleLoader(window);\r\n  angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\r\n```\r\nCan it be fixed/re-written more permanently without `try..catch` flow-control?\r\n\r\nThanks"}}