In template-driven forms, the _____ directive is used to create two-way data bindings on an input field.
- *ngFor
- *ngIf
- *ngModel
- *ngSwitch
In template-driven forms, the *ngModel directive is used to create two-way data bindings on an input field, allowing the field to sync its value with a component property.
Loading...
Related Quiz
- What is the primary purpose of using NgRx for state management in an Angular application?
- Which RxJS operator would you use to combine multiple Observables into a single Observable?
- Your Angular application includes a form that users utilize to submit sensitive data. How can you ensure that the form data is only submitted once, even if the user accidentally clicks the submit button multiple times?
- When handling form submission in Angular, preventing the default form submission behavior is done using the _______ method on the event object.
- To test if a directive correctly updates the host element's properties, you can use the ______ method.