ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

Is possible reload definition angularjs service? #325

Open Jhara opened 8 years ago

Jhara commented 8 years ago

I have an Angular module with a service. I need to reload a new service definition generated dynamically from the back end, but when I request the new service in the controller it returns the first service definition.

Even when I call $Injector.get('MyService') it returns the first definition.

angular.module("myModule", []).service("MyService", function(){ return { "say": "dinamic" }; // });

Is It possible? Thanks