{"action":"created","issue":{"url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/1","labels_url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/1/comments","events_url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/1/events","html_url":"https://github.com/danthareja/ocLazyLoad/pull/1","id":110270822,"number":1,"title":"fix: infinite loop in inject","user":{"login":"danthareja","id":6980359,"avatar_url":"https://avatars.githubusercontent.com/u/6980359?v=3","gravatar_id":"","url":"https://api.github.com/users/danthareja","html_url":"https://github.com/danthareja","followers_url":"https://api.github.com/users/danthareja/followers","following_url":"https://api.github.com/users/danthareja/following{/other_user}","gists_url":"https://api.github.com/users/danthareja/gists{/gist_id}","starred_url":"https://api.github.com/users/danthareja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthareja/subscriptions","organizations_url":"https://api.github.com/users/danthareja/orgs","repos_url":"https://api.github.com/users/danthareja/repos","events_url":"https://api.github.com/users/danthareja/events{/privacy}","received_events_url":"https://api.github.com/users/danthareja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-07T16:57:37Z","updated_at":"2015-10-11T19:08:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/danthareja/ocLazyLoad/pulls/1","html_url":"https://github.com/danthareja/ocLazyLoad/pull/1","diff_url":"https://github.com/danthareja/ocLazyLoad/pull/1.diff","patch_url":"https://github.com/danthareja/ocLazyLoad/pull/1.patch"},"body":"I'm using ocLazyLoad with webpack and ran into an overflowing call stack when calling `$ocLazyLoad.inject()` manually. Looking at the source, it seems that if you give inject an array it will never stop recursing. By making the change in this PR i was able to fix the issue.\r\n\r\nCode snippet of my implementation for reference:\r\n\r\n```js\r\nrequire.ensure([], function(require) {\r\n\r\n  // Require our modules\r\n  // This replaces the `import` statements from above\r\n  let something = require('./about.something'); // an angular module\r\n  let component = require('./about.component'); // Just a directive factory function\r\n\r\n  // Inject all dependencies into our module\r\n  // This replaces adding them to the original angular.module dependency array\r\n  $ocLazyLoad.inject([\r\n    something.name // get the string to play nicely with $ocLazyLoad\r\n  ])\r\n\r\n  // Register the component so the template recognizes it\r\n  .then(() => $compileProvider.directive('about', component))\r\n\r\n  // Continue the state transition\r\n  .then(deferred.resolve);\r\n\r\n}, 'about'); // Name our bundle so it shows up pretty in the network tab\r\n```"},"comment":{"url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/comments/147235755","html_url":"https://github.com/danthareja/ocLazyLoad/pull/1#issuecomment-147235755","issue_url":"https://api.github.com/repos/danthareja/ocLazyLoad/issues/1","id":147235755,"user":{"login":"danthareja","id":6980359,"avatar_url":"https://avatars.githubusercontent.com/u/6980359?v=3","gravatar_id":"","url":"https://api.github.com/users/danthareja","html_url":"https://github.com/danthareja","followers_url":"https://api.github.com/users/danthareja/followers","following_url":"https://api.github.com/users/danthareja/following{/other_user}","gists_url":"https://api.github.com/users/danthareja/gists{/gist_id}","starred_url":"https://api.github.com/users/danthareja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthareja/subscriptions","organizations_url":"https://api.github.com/users/danthareja/orgs","repos_url":"https://api.github.com/users/danthareja/repos","events_url":"https://api.github.com/users/danthareja/events{/privacy}","received_events_url":"https://api.github.com/users/danthareja/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T19:08:46Z","updated_at":"2015-10-11T19:08:46Z","body":"@ocombe any thoughts on this?"}}