Complete the code to bind the input value using ngModel.
<input type="text" [1]="username">
The [(ngModel)] syntax binds the input value two-way, so changes update the variable and vice versa.
Complete the code to import the module needed for ngModel binding.
import { [1] } from '@angular/forms';
The FormsModule must be imported to use ngModel for template-driven forms.
Fix the error in the code by completing the missing attribute for ngModel binding.
<input type="checkbox" name="subscribe" [1]="isSubscribed">
Checkbox inputs require two-way binding with [(ngModel)] to update the variable when toggled.
Fill both blanks to bind the input and handle the change event.
<input type="text" [1]="email" ([2])="onEmailChange($event)">
The [(ngModel)] binds the input value two-way, and (ngModelChange) listens for changes to trigger the handler.
Fill all three blanks to create a form input with label, two-way binding, and accessibility.
<label for="usernameInput">Username</label> <input id="usernameInput" type="text" [1]="username" name=[2] aria-label=[3]>
The input uses [(ngModel)] for two-way binding, the name attribute matches the variable, and aria-label improves accessibility by describing the input.