Reputation: 53
ngIf causes links on my page to show during load time, and then disappear.
The link is not supposed to show at all, and I am assuming that the ngIf statement hasn't been processed yet for the second I am able to see it.
Is there a way to prevent the link or element from showing at all?
In the below code my Boolean isEquipmentAssociated gets true in ngOninit,ngOnChanges and even I tried to make it true in constructor.
I have tried to do it with Css by doing display:none !important And also with '?' operator.but that is useful for object only.
//code goes here
<html>
<span *ngIf="isEquipmentAssociated">
<i class="fas fa-edit"></i>
// some other code
</span>
</html>
//code ends here
I expect my icon not to show at all from the beginning.
Upvotes: 1
Views: 1401