Z
Z
Z_Coder2013-12-20 15:46:09
JavaScript
Z_Coder, 2013-12-20 15:46:09

How to disenchant the magic of ember.js?

Greetings.
Another example from the ember.js documentation . The actual code is here . Purely mechanically, how this code works is clear, but a trace appears in an inquisitive mind. Questions:
1. How is the controller's isCompleted method (more precisely, computed property) called automatically when the state of the checked property of the input element changes, if there is no hint of this in the code itself? That is, how does the controller actually know when the state of the input element's checked property changes?
2. Where in the documentation is this behavior specified?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
_
_ _, 2013-12-20
@Z_Coder

stackoverflow.com/questions/16971011/itemcontrolle...
The each loop creates a TodoController for each item. In an element, the checked=isCompleted input is exactly what a two-way data binding is.

P
Philip, 2013-12-20
@shcherbanich

disenchant, bewilder

Z
Zhandos M, 2013-12-20
@Zhandos

Nothing but to read the source can not advise.
And is there any other way to understand how "it" works?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question