Discussions
After loading module there are no factory
over 8 years ago by Jasur Mirkhamidov
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?