Update:
Import MdInputDirective
import {MdInputDirective} from '@angular/material';
In compoent do following:
@ViewChild('input') input: MdInputDirective;
ngOnInit(){
this.input.underlineRef.nativeElement.className = null;
}
In html, add the #input
reference:
<md-input-container #input>
<input mdInput placeholder="Last 4 SSN">
</md-input-container>
Plunker demo
Original:
Try css:
::ng-deep .mat-input-underline {
display: none;
}
demo
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…