⊗jsagPmCdEC 25 of 97 menu

The else construct in Angular

Angular also has the @else construct:

@if (isAdmin) { <div> admin </div> } @else { <div> user </div> }

Let the property age store the user's age. Show adult text if the user's age is greater than 18 years old, and child text otherwise.

enru