Can a directive delete itself from a parent scope
问题 Let's say I have the following code <div ng-app="app" ng-controller="controller"> <div ng-repeat="instance in instances> <customDirective ng-model="instance"></customDirective> </div> </div> And my custom directive has an isolated scope, defined as: app.directive('customDirective', function($log) { return { restrict: 'E', templateUrl: './template.htm', scope: {_instance:"=ngModel"}, link: function($scope) { .... } }); In this directive, I have to option to delete it. My question is how can I