I\'ve ran into problem with ng-controller and \'resolve\' functionality:
I have a controller that requires some dependency to be resolved before running, it works fine w
I was trying to solve the problem using ng-init
but came across the following warnings on angularjs.org
The only appropriate use of ngInit is for aliasing special properties of ngRepeat, as seen in the demo below. Besides this case, you should use controllers rather than ngInit to initialize values on a scope.
So I started searching for something like ng-resolve
and came across the following thread:
https://github.com/angular/angular.js/issues/2092
The above link consists of a demo fiddle that have ng-resolve
like functionality. I think ng-resolve
can become a feature in the future versions of angular 1.x. For now we can work around with the directive mentioned in the above link.