-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
16
Description
If tab content is lazy loaded by declaring the body in a ng-template with the matTabContent attribute then Change Detection in this content does not works as expected.
At the same time if exactly this content is earer loaded, then Change Detection work fine.
Problem occurs only when in tab content used traditional data binding. With signal no problem.
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-eryh6yyk
First three tabs has the same component with traditional data binding as content. The last tab has component with signals as content.
Steps to reproduce:
- Click "Start loading" button on first tab. Progress bar will be appeared.
- Switch to second tab and click "Start loading" button. Progress bar will NOT be appeared.
- Switch back to first tab and click "Start loading" button. This time progress bar will NOT be appeared.
- Switch to third tab which content is eager loaded. Here all works as expected. Progress bar will be appeared.
- Switch to fourth tab which content is lazy loaded, but there signals are used. Here also all fine. Progress bar will be appeared.
Expected Behavior
The change detection in components which is used as lazy loaded content of MatTab works.
Actual Behavior
The change detection in components which is used as lazy loaded content of MatTab does not works.
Environment
- Angular: ^19.2.0
- CDK/Material: ^19.2.19
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11