Reputation: 8491
I did update my app from v14 to v15.
In the update, I can see that Angular changed
// From
import { MatDialog } from '@angular/material/dialog'
// To
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'
Does somebody know the reason why? I searched over on their website but couldn't find anything useful.
Shall I just set this back to the value it was before?
Upvotes: 20
Views: 14736
Reputation: 8491
Basically, legacy is the older, deprecated logic that we used to have. The support will be dropped in the v17
Angular did change them so that we can migrate them one at the time.
To see the list of changed item, look at the following github page.
So this is safe to leave it as
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'
and refactor the page one at the time.
They also have added a migration script, so running ng generate @angular/material:mdc-migration
will help you in doing it.
Upvotes: 17