How can I style all inputs on the Angular Material input component (matInput) using Typescript?
I attempted to implement this solution, but it only affects the first element.
ngAfterViewInit () {
const matlabel = this.elRef.nativeElement.querySelector('.mat-form-field-label');
matlabel.style.color = 'white';
}
=====================
<form [formGroup]="form" (ngSubmit)="login()">
<table cellspacing="0" class="tb-login">
<tr>
<td>
<mat-form-field class="form-login">
<input matInput type="text" placeholder="Login" formControlName="login" class="input-login"/>
</mat-form-field>
</td>
</tr>
<tr>
<td>
<mat-form-field class="form-login">
<input matInput type="password" placeholder="Password" formControlName="password" class="input-login"/>
</mat-form-field>
</td>
</tr>
<tr>
<td>
<button mat-raised-button type="submit" class="btn_login">Login</button>
</td>
</tr>
</table>
</form>
Angular v7 Material Angular v7
Your suggestions are much appreciated.