Is it possible to inject scope or controller during running ? or any other advice to dynamically inject services into controller ?
Application.controller('IndexController', function($scope){
// some actions
if(someconditions) {
$scope.$inject = [someServiceName];
// and here i want to use service methods
}
});
Thanks in advance
See Question&Answers more detail:os