When creating a dynamic form, how can you ensure that the form adjusts based on data fetched from an API?

  • Use ngFor directive to iterate through form controls
  • Use ngIf directive to conditionally render form elements
  • Use reactive forms with a fixed structure
  • Use static HTML templates
To ensure that a dynamic form adjusts based on data fetched from an API in Angular, you should use the ngFor directive to iterate through form controls. This allows you to generate form elements dynamically based on the API data.
Add your answer
Loading...

Leave a comment

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