After loading module there are no factory

Posted in General by Jasur Mirkhamidov Thu Dec 03 2015 13:38:46 GMT+0000 (Coordinated Universal Time)·Viewed 1,470 times

I got a code ``` (function(){ angular .module('MyApp') .run(_run); _run.$inject = ["$rootScope", "settings", "$ocLazyLoad"]; function _run($rootScope, settings, $ocLazyLoad) { // START loading $ocLazyLoad.load('UserModule').then(function(d){ console.log(d); console.log(user); }); // END loading // INIT or define some data $rootScope.$settings = settings; } })(); ``` but after `UserModule` loaded there is no `user` factory What am I doing wrong?
  
Markdown is allowed