parent
5baa79b179
commit
f54ae8b306
|
@ -26,7 +26,7 @@ include ../../../../_includes/_util-fns
|
||||||
of JavaScript with restrictions and a few added tricks.
|
of JavaScript with restrictions and a few added tricks.
|
||||||
|
|
||||||
When writing a binding we must be aware of a template statement's **execution context**.
|
When writing a binding we must be aware of a template statement's **execution context**.
|
||||||
The identifiers appearing within an statement belong to a specific context object.
|
The identifiers appearing within a statement belong to a specific context object.
|
||||||
That object is usually the Angular component that controls the template ... which it definitely is
|
That object is usually the Angular component that controls the template ... which it definitely is
|
||||||
in this case because that snippet of HTML belongs to the following component:
|
in this case because that snippet of HTML belongs to the following component:
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ figure.image-display
|
||||||
Angular only updates the bindings (and therefore the screen)
|
Angular only updates the bindings (and therefore the screen)
|
||||||
if we do something in response to asynchronous events such as keystrokes.
|
if we do something in response to asynchronous events such as keystrokes.
|
||||||
|
|
||||||
That's why we bind the `keyup` event to an statement that does ... well, nothing.
|
That's why we bind the `keyup` event to a statement that does ... well, nothing.
|
||||||
We're binding to the number 0, the shortest statement we can think of.
|
We're binding to the number 0, the shortest statement we can think of.
|
||||||
That is all it takes to keep Angular happy. We said it would be clever!
|
That is all it takes to keep Angular happy. We said it would be clever!
|
||||||
:marked
|
:marked
|
||||||
|
|
Loading…
Reference in New Issue