I'm trying to detect when all form elements on the page have been populated (including dropdowns), before triggering a function that initializes a plugin on those elements.
Right now I'm using a very ugly timeout function with a delay, but it obviously varies based on loading times. Also I have multiple controllers that are responsible for rendering out the various form fields on the page.
I tried calling the plugin after one of the render functions but there's still a variable delay from when the render occurs and the select boxes are populated.
I was thinking adding a ng-model on the < form > but how would I know when it's done populating?
So basically I want a reliable way for:
The page loads ALL the form elements (including populated the select boxes)
an event triggers which call my plugin
Seems like there should be an easy solution that I'm not aware of.
Thanks in advance.