Angular 2 property binding

Hello everybody,

today I want to write few words about binding in AngularJS 2.

There are two ways of making one way binding:

  1. element property binded to template expression
  2. property interpolation

I've described it with following picture:

Two-way Binding

<input [(ngModel)]='property'>

And property is decalred in Component class like this:

export class ClassComponent {

       property: string = "Property value";

}

No Comments

Add a Comment