I have a number of elements that I want to be visible under certain conditions.
In AngularJS I would write
stuff
Use the [hidden] attribute:
[hidden]="!myVar"
Or you can use *ngIf
*ngIf="myVar"
These are two ways to show/hide an element. The only difference is: *ngIf will remove the element from DOM while [hidden] will tell the browser to show/hide an element using CSS display property by keeping the element in DOM.