{"action":"created","issue":{"url":"https://api.github.com/repos/subchen/angular-async-loader/issues/5","repository_url":"https://api.github.com/repos/subchen/angular-async-loader","labels_url":"https://api.github.com/repos/subchen/angular-async-loader/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/subchen/angular-async-loader/issues/5/comments","events_url":"https://api.github.com/repos/subchen/angular-async-loader/issues/5/events","html_url":"https://github.com/subchen/angular-async-loader/issues/5","id":155888591,"number":5,"title":"发现你代码中有一段代码可以注册第三方module","user":{"login":"incomparable9527","id":9129438,"avatar_url":"https://avatars.githubusercontent.com/u/9129438?v=3","gravatar_id":"","url":"https://api.github.com/users/incomparable9527","html_url":"https://github.com/incomparable9527","followers_url":"https://api.github.com/users/incomparable9527/followers","following_url":"https://api.github.com/users/incomparable9527/following{/other_user}","gists_url":"https://api.github.com/users/incomparable9527/gists{/gist_id}","starred_url":"https://api.github.com/users/incomparable9527/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incomparable9527/subscriptions","organizations_url":"https://api.github.com/users/incomparable9527/orgs","repos_url":"https://api.github.com/users/incomparable9527/repos","events_url":"https://api.github.com/users/incomparable9527/events{/privacy}","received_events_url":"https://api.github.com/users/incomparable9527/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-20T05:15:38Z","updated_at":"2016-05-20T05:31:49Z","closed_at":null,"body":"发现你代码中有一段代码可以注册第三方module\r\n是因为没有完善,所以才没有暴露这个方法么?\r\n```javascript\r\n                    app.useModule = function (name) {\r\n                        var module = angular.module(name);\r\n                        if (module.requires) {\r\n                            for (var i = 0; i < module.requires.length; i++) {\r\n                                app.addModule(module.requires[i]);\r\n                            }\r\n                        }\r\n                        angular.forEach(module._invokeQueue, function(invokeArgs) {\r\n                            var provider = ngProviders[invokeArgs[0]];\r\n                            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\r\n                        });\r\n                        angular.forEach(module._configBlocks, function(fn) {\r\n                            $injector.invoke(fn);\r\n                        });\r\n                        angular.forEach(module._runBlocks, function(fn) {\r\n                            $injector.invoke(fn);\r\n                        });\r\n\r\n                        return app;\r\n                    };\r\n```"},"comment":{"url":"https://api.github.com/repos/subchen/angular-async-loader/issues/comments/220520833","html_url":"https://github.com/subchen/angular-async-loader/issues/5#issuecomment-220520833","issue_url":"https://api.github.com/repos/subchen/angular-async-loader/issues/5","id":220520833,"user":{"login":"incomparable9527","id":9129438,"avatar_url":"https://avatars.githubusercontent.com/u/9129438?v=3","gravatar_id":"","url":"https://api.github.com/users/incomparable9527","html_url":"https://github.com/incomparable9527","followers_url":"https://api.github.com/users/incomparable9527/followers","following_url":"https://api.github.com/users/incomparable9527/following{/other_user}","gists_url":"https://api.github.com/users/incomparable9527/gists{/gist_id}","starred_url":"https://api.github.com/users/incomparable9527/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incomparable9527/subscriptions","organizations_url":"https://api.github.com/users/incomparable9527/orgs","repos_url":"https://api.github.com/users/incomparable9527/repos","events_url":"https://api.github.com/users/incomparable9527/events{/privacy}","received_events_url":"https://api.github.com/users/incomparable9527/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T05:31:49Z","updated_at":"2016-05-20T05:31:49Z","body":"最近我也在研究这一块\r\n发现你代码里有这几句代码感到比较好奇.\r\n```javascript\r\n       angular.forEach(module._configBlocks, function(fn) {\r\n                            $injector.invoke(fn);\r\n                        });\r\n        angular.forEach(module._runBlocks, function(fn) {\r\n                            $injector.invoke(fn);\r\n                        });\r\n```\r\n我在开发中发现,这两块代码实际上用起来是会有一些问题的,\r\n不知道你会怎么解决"}}
{"actor":{"display_login":"incomparable9527"}}