{"action":"created","issue":{"url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/165","labels_url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/165/comments","events_url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/165/events","html_url":"https://github.com/ocombe/ocLazyLoad/issues/165","id":68598178,"number":165,"title":"LazyLoad a module from javascript directly","user":{"login":"gvandyk","id":11956996,"avatar_url":"https://avatars.githubusercontent.com/u/11956996?v=3","gravatar_id":"","url":"https://api.github.com/users/gvandyk","html_url":"https://github.com/gvandyk","followers_url":"https://api.github.com/users/gvandyk/followers","following_url":"https://api.github.com/users/gvandyk/following{/other_user}","gists_url":"https://api.github.com/users/gvandyk/gists{/gist_id}","starred_url":"https://api.github.com/users/gvandyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvandyk/subscriptions","organizations_url":"https://api.github.com/users/gvandyk/orgs","repos_url":"https://api.github.com/users/gvandyk/repos","events_url":"https://api.github.com/users/gvandyk/events{/privacy}","received_events_url":"https://api.github.com/users/gvandyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-15T07:17:02Z","updated_at":"2015-04-15T07:28:12Z","closed_at":null,"body":"I want to write a component/module that is totally self contained and I don't want to change code in other modules/controllers to load my module.\r\n\r\nCurrently I include a javascript file at the bottom of an html file that defines all the logic, controllers, components, directives etc.\r\n\r\nHow can I LazyLoad this file, without having to update another controller somewhere.\r\n\r\nfor instance: LazyLoadModule('mymodule.js'), instead of having the $ocLazyLoad service available.\r\n\r\nUsing the oc-lazy-load directive works perfectly well, if I surround all my html with a div that includes that directive. However I also need to write components with which I cannot do this.\r\n\r\nSo, in short: How can I call LazyLoad to load my module directly from within Javascript."},"comment":{"url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/comments/93237697","html_url":"https://github.com/ocombe/ocLazyLoad/issues/165#issuecomment-93237697","issue_url":"https://api.github.com/repos/ocombe/ocLazyLoad/issues/165","id":93237697,"user":{"login":"ocombe","id":265378,"avatar_url":"https://avatars.githubusercontent.com/u/265378?v=3","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T07:28:12Z","updated_at":"2015-04-15T07:28:12Z","body":"Hmm I'm not sure if I understand correctly what you're trying to do.\r\nWhen you say \"from javascript\" you mean from javascript that is not in an angular application ?\r\nOr are you trying to make your module auto load itself just by including the file ? If that's the case, will ocLazyLoad be available in your main app?"}}