Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

mdTabs: always recompiling template on tab switch (scope/watchers leak) #3692

@andreialecu

Description

@andreialecu

I'm seeing a huge scope leak when switching through tabs with watchers on them.

I was able to track it down to this:

if (ctrl.scope.noDisconnect) return;

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: demoA CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issueneeds: investigationThe cause of this issue is not well understood and needs to be investigated by the team or communityneeds: unit testsThis PR needs unit tests to cover the changes being proposedtype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions