This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
mdTabs: always recompiling template on tab switch (scope/watchers leak) #3692
Labels
needs: demo
A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue
needs: investigation
The cause of this issue is not well understood and needs to be investigated by the team or community
needs: unit tests
This PR needs unit tests to cover the changes being proposed
type: bug
Milestone
I'm seeing a huge scope leak when switching through tabs with watchers on them.
I was able to track it down to this:
material/src/components/tabs/js/templateDirective.js
Line 35 in f5959cc
Always being called on switching the tab, and the whole directive re-running from the beginning. The disconnect() function is never called. This seems to create a new scope and compile the template every single time.
I suspect it is related to the performance related change that was made recently, where tab content is ng-if'd out when not active, but I'm not sure.
Related: #3508
The repro there can also be used to reproduce this problem.
The text was updated successfully, but these errors were encountered: