我有一个 mat-form-field,我在该 mat-form-field 内使用了一个 custum mat-icon 作为 matprefix。现在我想为那个 matprefix 图标写一个点击方法。有没有可能?我尝试编写单击方法,但它不起作用
<mat-form-field floatLabel="never" >
<mat-icon (click)="clicking()" matPrefix class="formula-icon" svgIcon="lo-formula"
*ngIf="item[displayedColumn]?.formula != undefined && item[displayedColumn].lock == 'off'">
</mat-icon>
<input [value]=currentFocusValue
autocomplete="off">
</mat-form-field>