The correct way to do something when the page is fully loaded in AngularJS is by using the '$viewContentLoaded' event listener, by putting the following code into your controller.
$scope.$on('$viewContentLoaded', function(){ // do something }); |
Reference: http://www.aleaiactaest.ch/angular-js-and-dom-readyness-for-jquery/
This was quite useful. Thank you!
ReplyDelete