{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/4919","labels_url":"https://api.github.com/repos/angular/angular.js/issues/4919/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/4919/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/4919/events","html_url":"https://github.com/angular/angular.js/issues/4919","id":22528690,"number":4919,"title":"Support for CommonJS/AMD/UMD","user":{"login":"pluma","id":1280922,"avatar_url":"https://avatars.githubusercontent.com/u/1280922?v=3","gravatar_id":"","url":"https://api.github.com/users/pluma","html_url":"https://github.com/pluma","followers_url":"https://api.github.com/users/pluma/followers","following_url":"https://api.github.com/users/pluma/following{/other_user}","gists_url":"https://api.github.com/users/pluma/gists{/gist_id}","starred_url":"https://api.github.com/users/pluma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluma/subscriptions","organizations_url":"https://api.github.com/users/pluma/orgs","repos_url":"https://api.github.com/users/pluma/repos","events_url":"https://api.github.com/users/pluma/events{/privacy}","received_events_url":"https://api.github.com/users/pluma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/1.5-candidate","name":"1.5-candidate","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/27","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/27/labels","id":489171,"number":27,"title":"Backlog","description":"Holds the backlog of issues and pull requests that have been triaged.\r\n\r\nBefore assigning items to this milestone they should be labelled, at the very least with the correct \"type\" label (i.e. \"issue\", \"pr\", \"bug\", \"regression\", \"chore\", \"docs\", etc).  Preferably you should also check for duplicate issues/PRs, note CLA status and assign \"complexity\" and \"impact\" labels too.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":723,"closed_issues":701,"state":"open","created_at":"2013-11-18T23:30:35Z","updated_at":"2015-01-09T18:42:06Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2013-11-12T15:54:31Z","updated_at":"2015-01-09T19:11:26Z","closed_at":null,"body":"This is not another \"Angular modules should be real modules\" ticket.\r\n\r\nCurrently AngularJS directly pollutes the global namespace. This means using angularjs in an environment that uses a module loader (e.g. require.js or browserify) requires developers to use shims or just give up and use AngularJS from the window object directly.\r\n\r\nInstead, AngularJS should only attach itself to the window object if AMD is not present and there is no CommonJS/node-style `module`/`exports` object available. The [UMD](https://github.com/umdjs/umd) repository has plenty of examples for this.\r\n\r\nThe only implementation issue I can see is that AngularJS is becoming more modularized with \"plugins\" like the ngRoute module, which depend on AngularJS and potentially modify the `angular` object directly.\r\n\r\nIdeally AngularJS should also provide an npm package (for browserify primarily, but with some modifications it could also work with server-side implementations of the browser DOM).\r\n\r\nI realize the whole \"modularity\" concept is a problem with the different interpretations of how modules ought to work between AngularJS on the one side and AMD/CommonJS on the other, but I think it would be beneficial to the community if it were possible to load the files that are currently intended to be loaded via script tags with a real module loader like require.js/curl.js or browserify instead.\r\n\r\nEDIT: Another problem I could imagine would be the optional dependency on jQuery (and potentially Q) as neither AMD nor CommonJS currently provide a mechanism for optional dependencies. If that's the only thing keeping AngularJS back, I would recommend creating a mechanism to configure AngularJS after it has been loaded (though before it has been applied to the document)."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/69382911","html_url":"https://github.com/angular/angular.js/issues/4919#issuecomment-69382911","issue_url":"https://api.github.com/repos/angular/angular.js/issues/4919","id":69382911,"user":{"login":"pkozlowski-opensource","id":973550,"avatar_url":"https://avatars.githubusercontent.com/u/973550?v=3","gravatar_id":"","url":"https://api.github.com/users/pkozlowski-opensource","html_url":"https://github.com/pkozlowski-opensource","followers_url":"https://api.github.com/users/pkozlowski-opensource/followers","following_url":"https://api.github.com/users/pkozlowski-opensource/following{/other_user}","gists_url":"https://api.github.com/users/pkozlowski-opensource/gists{/gist_id}","starred_url":"https://api.github.com/users/pkozlowski-opensource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkozlowski-opensource/subscriptions","organizations_url":"https://api.github.com/users/pkozlowski-opensource/orgs","repos_url":"https://api.github.com/users/pkozlowski-opensource/repos","events_url":"https://api.github.com/users/pkozlowski-opensource/events{/privacy}","received_events_url":"https://api.github.com/users/pkozlowski-opensource/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T19:11:25Z","updated_at":"2015-01-09T19:11:25Z","body":"Oh, @btford is here already :-)"}}