Question · Angular course · Module 2: Components

New @if Syntax

What is the new conditional rendering syntax in Angular 17+?

Answer options

  • *ngIf="condition"
  • @if (condition) { }
  • v-if="condition"
  • {#if condition}
Show the answer

Correct answer:

  • @if (condition) { }