Q. Which directive would you use to show an element only when a condition is true?
β
Correct Answer: (A)
*ngIf
Explanation: *ngIf is used for conditional rendering in the DOM.