ngIf导致页面上的链接在加载期间显示,然后消失。
该链接根本不应该显示,我假设第二次仍未处理ngIf语句。
有没有办法完全防止链接或元素显示?
在下面的代码中,我的布尔值isEquipmentAssociated在ngOninit,ngOnChanges中变为true,甚至尝试在构造函数中使其变为true。
我试图通过display:none!important使用Css来做 还有'?'运算符。但这仅对对象有用。
//code goes here
<html>
<span *ngIf="isEquipmentAssociated">
<i class="fas fa-edit"></i>
// some other code
</span>
</html>
//code ends here
我希望图标从一开始就不会显示。