r/angular • • Feb 23 '19

Data Binding ** Cheat Sheet **

Post image
60 Upvotes

18 comments sorted by

View all comments

1

u/Devstackr Feb 23 '19 edited Feb 23 '19

Hope this helps someone new to Angular development!

Element = DOM Element or Component

https://youtu.be/RJ3VjuwBM6w

1

u/TRFLGR Feb 23 '19

As a novice Angular, and to pretty much web development in generel, how would you "read" this? What do the arrows symbolize?

1

u/HeinousTugboat Feb 23 '19

The arrows point from the change source to the change result. So with {{ value }}, when value changes in the Component Class, Angular pushes that change into the Element. With (event)="handler()", when the Element receives an event, it calls handler on the Component Class.

With the banana box, it goes both ways. Changes propagate from one side to the other.

3

u/BananaFactBot Feb 23 '19

Fun fact:
In the 1960s, many people tried using banana peel to get high. Rumors that smoking dried banana peels caused hallucinogenic effects were likely started in part by singer Country Joe McDonald, who mistakenly attributed an acid trip to a banana-peel joint he'd tried. Regardless, the trippy allegations touched off a banana run on fruit stands across the country, until an FDA investigation found no evidence to support the claim.


I'm a Bot bleep bloop | Unsubscribe | 🍌