Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why does Angular MDC adds appearance="outlined" to template files?

FYI, I have upgraded Angular app from v14 to v15. I have upgraded Angular Material too to v15 and then executed MDC migration command too.

I noticed that almost all the template files, the MDC step has added appearance="outlined" to most of the elements. But whereas some previous files in the project (even before MDC), has appearance="outline" implemented by previous developers.

So, what should I do now, now my application has both appearance="outlined" & appearance="outline" in different files. Should I maintain consistency to only have any of the two variants in entire application?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

On the source code of mat-form-field(v15) line 56.

/** Possible appearance styles for the form field. */
export type MatFormFieldAppearance = 'fill' | 'outline';

When looking at mat-formfield(v14) These are the valid types!

/** Possible appearance styles for the form field. */
export type MatFormFieldAppearance = 'legacy' | 'standard' | 'fill' | 'outline';

So to conclude outlined is either a typo or incorrect value, go with 'outline' throughout the usages!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading