вы можете попробовать следующим образом:
ts:
import { MdcTextField, MdcIcon } from '@angular-mdc/web';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
constructor(
private _renderer: Renderer2) {}
}
html:
<div class="demo-content">
<h3 class="demo-content__headline">Outlined Text Field</h3>
<div class="demo-layout__row">
<button mdc-button (click)="outlined.disabled = !outlined.disabled">Disabled: {{outlined.disabled ? 'On' : 'Off'}}</button>
<button mdc-button (click)="outlined.required = !outlined.required">Required: {{outlined.required ? 'On' : 'Off'}}</button>
<button mdc-button (click)="outlined.dense = !outlined.dense">Dense: {{outlined.dense ? 'On' : 'Off'}}</button>
<button mdc-button (click)="alternateColors(outlined)">Alternate Colors</button>
</div>
<mdc-text-field #outlined outlined label="Your name"></mdc-text-field>
<br>
<mdc-text-field #outlined outlined label="Password"></mdc-text-field>
</div>
DEMO