What is the alternative of ng-cloak(angularjs) in Angular 7 for boolean variable not for object

1.3k Views Asked by At

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.

0

There are 0 best solutions below