Font Awesome + Angular:不允许使用空表达式

Font Awesome + Angular: Empty Expressions are not allowed

我正在像这样在我的组件中导入很棒的字体(分别尝试):

import * as faInfoCircle from '@fortawesome/pro-solid-svg-icons/faInfoCircle';

import * as faInfoCircle from '@fortawesome/pro-regular-svg-icons/faInfoCircle';

在class中定义为:

faInfoCircle = faInfoCircle;

在模板中使用:

<mh1-icon-button [icon]="faInfoCircle"
[iconClasses]="['btn']"
(click)=""
[tooltip]="'this is a tooltip'"> test
</mh1-icon-button> 

我收到此错误:

    Uncaught Error: Uncaught (in promise): Error: Template parse errors:
    Empty expressions are not allowed ("n-button [icon]="faInfoCircle"
                      [iconClasses]="['btn']"
                      (click)="[ERROR ->]"
                      [tooltip]="'this is a tooltip'"> test
                      </mh1-icon-button>
    "): ng:///PressureModule/PressureDetailsComponent.html@250:27

寻找解释/深入了解此错误发生的原因

删除(点击)处理程序。正如错误所解释的那样,它不能为空。此错误与 FontAwesome 无关。