I have a function which I want to call after page content is loaded. I read about $viewContentLoaded and it doesn't work for me. I am looking for something like
document.addEventListener('DOMContentLoaded', function () {
//Content goes here
}, false);
Above call doesn't work for me in AngularJs controller.
If you're getting a $digest already in progress error, this might help:
The solution that work for me is the following
Controller code is the following
Html code is the following