The ______ directive provides two-way data binding in template-driven forms, synchronizing the form control's value with a property in the component.
- [(ngModel)]
- [formModel]
- [ngBind]
- [twoWayBinding]
The [(ngModel)] directive provides two-way data binding in template-driven forms. It allows you to bind a form control's value to a property in the component, ensuring that changes to either the form control or the component property are reflected in both directions. This synchronization is a key feature of Angular template-driven forms, making it easy to work with form data in the component.
Loading...
Related Quiz
- You are tasked with creating a dynamic dashboard where users can add or remove widgets based on their preference. Which Angular feature would you leverage to dynamically render these widgets?
- What is the purpose of the ControlValueAccessor interface in Angular forms?
- What's the primary difference between the switchMap and mergeMap operators?
- How can you achieve nested routing (child routes) within an Angular application?
- For a router link to get an "active" CSS class when the link's route is active, you can use the ________ directive.