I have input element in Angular Material:
<md-input-container>
<input type="text" mdInput placeholder="">
</md-input-container>
When input has focus it displays underline. How to hide or remove that?
Seem I need to set null
for underlineRef
?
I was playing a bit with the appearance
property of mat-form-field
and found that if you put a "none" value (or any other unsupported value), you will get clear input.
The code:
<mat-form-field appearance="none">
<mat-label>"None" form field</mat-label>
<input matInput placeholder="Placeholder">
</mat-form-field>
StackBlitz demo (edited from the official angular demo).
The original example can be found here: Form field appearance variants.
I admit, this is a little bit of a hack.