ngModel

  • Enables two-way data binding within a form
  • Creates a FormControl instance from a domain model and binds it to a form element
  • We can create a local variable to reference the ngModel instance of the element
<input #nameRef="ngModel" [(ngModel)]="selectedItem.name" 
 name="name" placeholder="Enter a name" type="text">