April 2018
Beginner
536 pages
13h 21m
English
In Angular, we use data binding to coordinate the application's state with the content rendered on screen. Angular supports three kinds of binding, distinguished by the direction of data flow:
|
Data direction |
Syntax |
Type |
|
One-way from data source to view target |
{{expression}} [target]="expression" |
|
|
One-way from view target to data source |
(target)="statement" |
Event |
|
Two-way |
[(target)]="expression" |
Two-way |
Binding types other than interpolation have a target name to the left of the equals sign, surrounded by punctuation ([] and ()).