The new @if which we can use to replace *ngIf is available from Angular 17.
The new syntax is much cleaner and easier to read and write, and more powerful.
Let’s go over the changes:
*ngIf -> @if
The old way of creating an if statement in your angular templates was by using the *ngIf directive.
The new way is by using the @if syntax.
let’s see an example: