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
200
Databinding in Angular 2
Manfred Steyer
PRO
October 25, 2016
Tweet
Share
More Decks by Manfred Steyer
See All by Manfred Steyer
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
18
Modern Angular:Renovation for Your Applications @angularDays 2025 Munich
manfredsteyer
PRO
0
95
Effective Signals in Angular 19+ Rules and Helpers
manfredsteyer
PRO
0
190
The Price of Micro Frontends… and Your Alternatives @bastacon 2025 in Frankfurt
manfredsteyer
PRO
0
460
Your Architecture as a Crime Scene:Forensic Analysis @bastacon 2025 in Frankfurt
manfredsteyer
PRO
0
180
Modern Angular with Signals and Signal StoreNew Rules for Your Architecture @bastacon 2025 in Frankfurt
manfredsteyer
PRO
0
200
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
870
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
520
Your Architecture as a Crime Scene: Improvements with Forensic Analysis
manfredsteyer
PRO
0
29
Other Decks in Programming
See All in Programming
Scala 3 で GLSL のための c-like-for を実装してみた
exoego
1
170
Preact、HooksとSignalsの両立 / Preact: Harmonizing Hooks and Signals
ssssota
1
120
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
860
データベースエンジニアの仕事を楽にする。PgAssistantの紹介
nnaka2992
8
3.7k
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
350
バックエンドNode.js × フロントエンドDeno で開発して得られた知見
ayame113
4
1.2k
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
11
3.2k
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
2.1k
remix + cloudflare workers (DO) docker上でいい感じに開発する
yoshidatomoaki
0
110
本当だってば!俺もTRICK 2022に入賞してたんだってば!
jinroq
0
180
AIエージェントを活用したアプリ開発手法の模索
kumamotone
1
730
보일러플레이트 코드가 진짜 나쁜 건가요?
gaeun5744
0
360
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
429
65k
GraphQLとの向き合い方2022年版
quramy
45
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Into the Great Unknown - MozCon
thekraken
35
1.7k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
134
33k
The Pragmatic Product Professional
lauravandoore
33
6.5k
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] manfred.steyer@SOFTWAREarchitekt.at [blog] SOFTWAREarchitekt.at [twitter] ManfredSteyer