-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
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
No response
Description
When Migrating to MDC-based Angular Material Components, and doing it component by component, it should only migrate the selected components. Right now other components that are not selected are also migrated. Seems that it only happens on imports.
Take for example this ngModule code:
import {NgModule} from '@angular/core';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
@NgModule({imports: [MatLegacyButtonModule, MatLegacyCheckboxModule]})
export class AppModule {}Right now, migrating this file selecting only the "button" migrates also the Checkbox. This should not happen.
Reproduction
Steps to reproduce:
Execute the migration for only "button" on this ngModule code:
import {NgModule} from '@angular/core';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
@NgModule({imports: [MatLegacyButtonModule, MatLegacyCheckboxModule]})
export class AppModule {}Expected Behavior
Should migrate only selected components
Actual Behavior
Selectively migrating components is buggy and in some cases, like imports, other components are also migrated
Environment
- Angular: 15.1.0
- CDK/Material: 15.1.0
- Browser(s): -
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
JaxonWright, ectuser, bampakoa, iklimis, ricardojbertolin and 4 more
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team