Conditional
*ngIf shows or removes a node. false → gone from the DOM, not just hidden. [hidden] only hides with CSS. Know the difference.
Board: *ngIf="marks >= 40; else failTpl". 0 is falsy — *ngIf="marks" hides a zero score. Write *ngIf="marks != null" if zero is valid.
New control flow @if (marks >= 40) { … } does the same idea. Trap: *ngIf on a huge block that you really wanted to hide visually but keep alive (audio, focus).
marks >= 40 ?
│ yes → Pass banner
│ no → Fail template
*ngIf removes DOMExam tip
*ngIf vs hidden. Watch 0.