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

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm