javascript - removing scope does not work -
unfortunately did not find answer myself in documentation or in google, maybe can me find out 1 thing. imagine have directive "mydirective". located on div element. when remove div using remove method jquery, "$destory" event triggered on dom node. scope of "mydirective" still exists. can listen "$destroy" on div element , manually call scope.$destroy(), why angular not this?
use integrated jqlite instead of jquery. example :
angular.element(yourelement).remove();
after, if have problem, reset scope variable related directive (if exists) :
$scope.yourelement = {};
Comments
Post a Comment