In template-driven forms, the ______ directive is used to bind an input field to a property in the component's class.

  • ngBinding
  • ngDirective
  • ngModel
  • ngTemplate
In template-driven forms in Angular, the "ngModel" directive is used to bind an input field to a property in the component's class. This directive establishes two-way data binding between the form control and the component class property, allowing changes in the input field to be reflected in the component and vice versa.
Add your answer
Loading...

Leave a comment

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