Two Way Binding Data Binding in AngularJS 1.x Page 4 Model Model Directive Nearly everything can depend on everything Leads to serveral digest cycles
App Component (e. g. list) Component (e. g. list-item) Component (e. g. list-item) Property-Binding (One Way, Top/Down) Page 6 model item item {{ item.title }} {{ item.title }} [http://victorsavkin.com/post/110170125256/change-detection-in-angular-2]
cycle needed • Child component must not modify parent component (e. g. by using setters) • Angular 2 checks for this in dev mode Event Bindings (One Way, Bottom/Up) Page 8 {{ item.title }} {{ item.title }} Event-Handler Event-Handler
Event Binding: One Way; Bottom/Up • Two Way = Property Binding + Event Binding • Conventions for Two Way Binding • Align to this conventions in own components Page 13 Contact [mail] [email protected] [blog] SOFTWAREarchitekt.at [twitter] ManfredSteyer