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