+1
I came here with the same question. Is the non-destruction of isolated
scopes intentional?
To manually destroy the isolate scope, we can act on the element $destroy
event:
element.on('$destroy', function () {
scope.$destroy();
});
But my assumption/hope/expectation was that Angular took care of this...
On Tuesday, July 8, 2014 1:52:16 PM UTC+2, Christopher Ng wrote:
>
> sorry, i know that's why it isn't working. my question is, is this
> expected behaviour? if so, is it possible to be notified when the element
> that the scope 'belongs' to is destroyed?
>
> On Monday, July 7, 2014 6:42:45 PM UTC+1, Sander Elias wrote:
>>
>> Hi Christopher,
>>
>> Your directive has an empty isolate scope, the isolation prevents it from
>> receiving the destruction event.
>> if you remove the scope, or make in an new scope in stead of an isolate,
>> it will work.
>>
>> Regards
>> Sander
>>
>>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.