我输入输入字段如下:
@H_502_12@<input mdInput placeholder="Name" #filterName name="filterName" >
我想清除点击清除按钮的价值:
<button (click)="clearFilters()">Clear</button> app.component.ts function : filterName : string = null; clearFilters() { this.filterName = ''; }
请告诉我上面的错误,因为它不适合我.
这里是jsfiddle https://jsfiddle.net/8fw8uq3x/