Solved
Call function on view is loaded
I will call a service automatically when a view is loaded. I try this via window.onload or document.onload but this will not work. How can I realized this?
I will call a service automatically when a view is loaded. I try this via window.onload or document.onload but this will not work. How can I realized this?
Yes, I'm sure, I use it all the time. But you have to define the function first before assigning it as a callback. So try this instead:
$scope.init = function(){
console.log("bla");
};
angular.element(document).ready($scope.init);Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.