The directive that's used to manipulate the structure of the DOM by adding/removing elements is prefixed with ________.

  • *ngFor
  • *ngIf
  • *ngSwitch
  • *ngStyle
The directive used to manipulate the DOM structure by adding or removing elements conditionally is prefixed with *ngIf in Angular. It allows you to control whether an element is rendered based on a given condition. The other options, like *ngFor, *ngSwitch, and *ngStyle, are used for different purposes in Angular and do not add or remove elements from the DOM.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *