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

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -