Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Databinding in Angular 2
Search
Manfred Steyer
PRO
October 25, 2016
Programming
0
210
Databinding in Angular 2
Manfred Steyer
PRO
October 25, 2016
Tweet
Share
More Decks by Manfred Steyer
See All by Manfred Steyer
Advanced Micro Frontends: Multi Version/ Framework Scenarios
manfredsteyer
PRO
0
350
Advanced Micro Frontends: Multi Version/ Framework Scenarios @WAD 2025, Berlin
manfredsteyer
PRO
0
620
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
500
The Missing Link in Angular‘s Signal Story Resource API and httpResource @ngRome 2025
manfredsteyer
PRO
0
160
Your Architecture as a Crime Scene:Forensic Analysis
manfredsteyer
PRO
0
230
Rethinking Data Access: The New httpResource in Angular
manfredsteyer
PRO
0
360
Reactive Thinking with Signals, Resource API, and httpResource @Devm.io Angular 20 Launch Party
manfredsteyer
PRO
0
240
JavaScript as a Crime SceneForensic Analysis
manfredsteyer
PRO
0
130
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @jax2025 in Mainz, Germany
manfredsteyer
PRO
0
230
Other Decks in Programming
See All in Programming
rage against annotate_predecessor
junk0612
0
170
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
3.2k
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.4k
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
1.9k
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
楽して成果を出すためのセルフリソース管理
clipnote
0
180
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
1から理解するWeb Push
dora1998
7
1.9k
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
560
RDoc meets YARD
okuramasafumi
4
170
Featured
See All Featured
Done Done
chrislema
185
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Scaling GitHub
holman
463
140k
Become a Pro
speakerdeck
PRO
29
5.5k
Into the Great Unknown - MozCon
thekraken
40
2k
Building Applications with DynamoDB
mza
96
6.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Designing Experiences People Love
moore
142
24k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Thoughts on Productivity
jonyablonski
70
4.8k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Transcript
Data Binding in Angular 2 Manfred Steyer
About me … • Manfred Steyer • SOFTWAREarchitekt.at • Trainer
& Consultant • GDE and MVP • Focus: Angular Page 2 Manfred Steyer
Data Binding in AngularJS 1.x Page 4 Model Model
Directive Nearly everything can depend on everything Leads to serveral digest cycles
Angular 2 Page 5 Component for whole 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]
Property Binding (One Way, Top/Down) • Only one digest 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 Bindings (One Way, Bottom/Up) • No digest cycle for
propagating events • But: Events can change state Updating Property Bindings Page 9
Property and Event Bindings Page 10 Performing Property Bindings
Executing Event Handlers Event occurs App is ready All handlers executed Properties bound
Two Way Binding Page 11 <input [(ngModel)]="from">
Two Way = Property and Event Bindings Page 12
<input [ngModel]="from" (ngModelChange)="from = $event"> Property + Change changed value
Summary • Property Binding: One Way; Top/Down • 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