Angular2 - data bindings concepts
Important import :
import {FormsModule} from '@angular/forms'
And include this into your app module
imports :[ ... , FormsModule ]
Two way data binding (banana box syntax)
<input id="name" type="text" [(ngModel)]="name" />
Or your can do it the longer way :
<input id="name" type="text" [ngModel]="name" (ngModelChange)="valueChange($event)"/>
valueChange(value){
}
Party on!
Comments