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.
Loading...
Related Quiz
- Which state management library in Angular uses concepts like Actions, Reducers, and Effects?
- To mock a service in Angular tests, you often replace the real service with a ______ service.
- Which directive is used to create a custom attribute in Angular?
- Which directive is used in Angular to conditionally display an element in the DOM?
- Which of the following is the primary building block of an Angular application?