如何解决字体真棒+角度:不允许使用空表达式
我正在这样的组件中导入很棒的字体(分别尝试了两者):
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无关。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。