Hello everyone,
I tried to render a
can.Model.extend using {{#each myModel}} helper with {{@key}} and
{{.}} to display my model. It displays perfectly when I try to add
or remove an attribute to my model: the view correctly is updated.
No problem here.
But I am encountering a problem when I try to update an attribute, like :
But I am encountering a problem when I try to update an attribute, like :
- myModel.attr('myAttribute', 'newValue');
I wrote a sample using can.Map (it is quicker to write, and I
noticed the same problem): http://jsfiddle.net/v4o0zs06/6/
You can notice there is no problem with adding and removing the
attribute, but there is no update on the view when the attribute
changes (change can be verified using console).
Maybe using {{#myModel}} helper would change something, but I
would not access to {{@key}} helper anymore, isn't it ?
Thanks.