38
rated 0 times
[
45]
[
7]
/ answers: 1 / hits: 33244
/ 12 Years ago, sat, january 19, 2013, 12:00:00
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
More From » angularjs