Aside leaks memory by not destroying its own scope when closed #1715
Comments
Not sure what is your exact setup. I have created a plunker with an example following your description and the destroy is triggered when the aside DOM element is destroyed, as expected. |
In your example the $destroy-event doesn't get triggered when I close the aside, so if I open & close it multiple times, I have several instances of the controller in memory. If I click the destroy-button to manually trigger the $destroy-event, I get multiple alerts from those controllers. I can of course force the destroy by replacing the close-button's ng-click="$hide()" with ng-click="$hide(); $destroy();". So is this expected behavior? It surprised me, at least :) |
Ah, I see what you mean now, I didn't test the plunker enough. |
@vmlf01 close this? |
thanks. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I use the current version of angular-strap (2.2.2) with angular 1.3.15 and noticed that the aside's scope never gets destroyed when using data-template.
This can be reproduced by using the default template with a controller that only has the listener for $destroy-event -> It never gets fired.
The text was updated successfully, but these errors were encountered: