javascript - Callback when ngRepeat/ngIf mutates DOM -


i have directive needs execute callback function whenever dom subtree mutated (by ngif or ngrepeat instance).

the directive ideally able inserted templates have made, rules out putting ng-init. i've looked @ documentation, , neither ngrepeat or ngif seem have events. additionally, seems of browser dom events have been depreciated well.

i use watch, can't think of expression work, jquery returns new object every time , length of .children() might unchanged through mutation if ngrepeat removes , inserts node in same $digest.

any suggestions on how detect dom subtree mutation entirely template-less directive?

edit: more detail, have multiple tables have rows of data inserted ngrepeat. whenever row inserted, if table has resize directive, need add css it. resize directive general enough go on every table without needing input, prefer not have add nginits ngrepeat elements.

for else looking solution work in situations this, angular recompiles repeated elements, if present. actual domnode objects different, can watch domnode.


Comments