Add Support for appearance for <mat-form-field> using JSON
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request
Current behavior Currently there are no option to select appearance for <mat-form-field>
Expected behavior allow option to select appearance.
Minimal reproduction of the problem with instructions
https://material.angular.io/components/form-field/overview#form-field-appearance-variants
What is the motivation / use case for changing the behavior? { key: ‘text’, type: ‘input’, templateOptions: { label: ‘Text’, placeholder: ‘Placeholder’, required: true, appearance: ‘legacy’ | ‘standard’ | ‘fill’ | ‘outline’ } }
Please tell us about your environment:
- Angular version: 6.0.X
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Form field appearance variants - StackBlitz
<mat-label>Legacy form field</mat-label>. <input matInput placeholder="Placeholder">. <mat-icon. matSuffix>sentiment_very_satisfied</. mat-icon>.
Read more >Submit a form with angular to Json file - Stack Overflow
Bind your form-control with [(ngModel)] to an object that you declare in your ts. In the onSubmit() method do whatever you have to...
Read more >Changing Angular Material Form Field Appearance
In this post, we are going to look at how you can change the default appearance of Angular Material Form Field Component.
Read more >Angular dynamic forms - Medium
Here in element and type, You can add more elements and types. In the dynamic form component we are creating all the form...
Read more >mat-table filter example: Search & Filter mat-table in Angular
Step 2: Add filter function ; mat-form-field appearance="standard"> ; mat-label> ; mat-label> ; input matInput (keyup)="applyFilter($event)" placeholder="Search ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@intellix pass the desired appearance through
MAT_FORM_FIELD_DEFAULT_OPTIONS
provider, here is a working example https://stackblitz.com/edit/angular-xdtrclalready supported check the following example https://stackblitz.com/edit/angular-dyxzi9