UPDATE
The way to do this is to create a new scope for an element with such a directive.
yourModule.directive('unbindable', function(){ return { scope: true }; });
And apply it to your element like this:
<div unbindable id="yourId"></div>
Then, to undo this item from any updates, you will do it.
angular.element( document.getElementById('yourId') ).scope().$destroy();
Done, here is a demo.
Demo: http://jsfiddle.net/KQD6H/
Thus, this creates a new region for the element and only works because all regions inherit all the data from their parent regions. therefore, the scope is basically the same as the parent scope, but allows you to destroy the scope without affecting the parent scope. Since this element was provided with its own scope when you destroy it, it does not return the parent scope like all other elements, if that makes sense 0.o
Everything below this line was my original answer, I will leave it here if someone prefers this method
I was able to achieve this with the unbindable directive. When you have an unbinable directive configured on an element, all that is required to untie the element is this.
yourElement.attr('unbind', 'true'); // Ref 1 $scope.$broadcast('unbind'); // Ref 2
Here is the directive.
app.directive('unbindable', function(){ return { scope: true, // This is what lets us do the magic. controller: function( $scope, $element){ $scope.$on('unbind', function(){ // Ref 3 if($element.attr('unbind') === 'true'){ // Ref 4 window.setTimeout(function(){ $scope.$destroy() }, 0);//Ref 5 } }); } } });
and you set your element in this way.
<h1 unbindable></h1>
Therefore, whenever you add the unbind="true" attribute to h1 and the broadcast unbind , the element will be unbind-ed
REF-1: Add the unbind true attribute to the element so that the directive will know which element you are disconnecting.
REF-2: Broadcast unbind event across all areas so that the directive knows that you want to decouple the element. Make sure you add the attribute first. --- Depending on your application layout, you may need to use $rootScope.$broadcast
REF-3 : when the unbind event is dispatched
REF-4 . If the element associated with the directive has a true unbind attribute
REF-5 . Then destroy the scope specified by the directive. We should use setTimeout because I think angular is trying to do something after the $on event, and we get an error, so using setTimeout prevent this error. Although it works instantly.
This works with a few elements, here is a good demo.
Demo: http://jsfiddle.net/wzAXu/2/