How can I call a function when view is fully loaded (text, images and everything)?
I've tried the following in my main controller, but it's alerting before content loads.
$(window).load(function() {
alert('dsdsds');
});
I'm using ui-router, so I tried this as well in my main controller,
$scope.$on("$stateChangeSuccess", function($currentRoute, $previousRoute) {
alert('sasas');
});
Here too, it's alerting before any content loads.
How can I do this?
htmlor put it at the bottom? that should make all of the DOM load before your JSng-repeatload? or is there any specific component should be loaded before showing alert?