A
A
Andrew2016-03-08 16:51:47
JavaScript
Andrew, 2016-03-08 16:51:47

Why is the model view not updating?

There is a common controller and two children, in the first child controller there is an input, in the second child controller there are two buttons that change the values ​​of the input.
If you change the value with the buttons, then everything works, but if you correct or delete the value in the input, then the value does not change with the buttons. In this case, the data is transmitted.
Here is an example jsfiddle.net/zfg5j485/1
How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bulat Kurbangaliev, 2016-03-08
@P1RATE

The problem is that the 'name' model is bound to the child1Controller controller, while the setName method is bound to the mainController controller. In general, I would do this: jsfiddle.net/94k2dadb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question