Edit: Actually, this isn't a duplicate. I'm asking how to run code once the Dynamic DOM is available, not the Static DOM:
Because my textareas are inside an ngRepeat, so they aren't available in the Static DOM.
I'm using autosize in an Angular app. I'm trying to call autosize like this at the beginning of my controller:
autosize(document.getElementsByTagName('textarea'));
It doesn't work, presumably because at the time the function is called, document.getElementsByTagName is empty.
So I need to call the function after the DOM elements have been rendered. How can I do that?
Note: I also tried putting it in the run block, but that didn't work either.
