I am wondering if there is a way for Angular JS to identify the view has loaded completely. I need to call a function on route change . I tried it with $routeChangeSuccess
. But the function is called before the view loaded completely. Is there any way to do this?
For example I am having a navigation menu, and I need to activate menu item while the root has changed. I am having a css class active
for showing a menu item is active. I wrote a function to make it active. if the url is www.myweb.com/#/dashboard, then dashboard menu should be active. The function is working perfectly. But the problem is the function calls before the view loaded completely. So it won't activate the menu item because, menu item is not there.
If you have a solution, let us all know about that.