javascript - What it the right way to be noticed when an element with specific directive attribute has been removed from DOM? -


i'm trying find way noticed in case element added , removed dom. in case element removed need ng-model value of element.

for example:
<div tell-me-when-removed ng-model="sometitle"></div> <a ng-click="removethedivabove()"></a>

i'm trying "sometitle"

you can use

scope.$on('$destroy', function() {    //your stuff here   }); 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -