Complete the code to bind the input value to the component property using ngModel.
<input type="text" [(ngModel)]="[1]">
The [(ngModel)] directive binds the input's value to the component property username for two-way binding.
Complete the code to import the module needed for ngModel to work.
import { [1] } from '@angular/forms';
The FormsModule must be imported to use ngModel for two-way binding in Angular templates.
Fix the error in the code to correctly bind the input to the property 'email'.
<input type="email" [1]="email">
Two-way binding requires the syntax [(ngModel)] to bind and listen for changes simultaneously.
Fill both blanks to create a two-way binding for the property 'age' in the input element.
<input type="number" [1]="[2]">
The input uses [(ngModel)] for two-way binding and binds to the component property age.
Fill all three blanks to bind the input to 'password', import the correct module, and add the module to imports array.
import { [1] } from '@angular/forms'; @NgModule({ imports: [[2]], }) export class AppModule {} // In template: <input type="password" [3]="password">
To use ngModel for two-way binding, you must import FormsModule, add it to the imports array, and use [(ngModel)] in the template.