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.
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