字体真棒+角度:不允许使用空表达式

问题描述

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

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

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

在课程中定义为:

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无关。