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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…