Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Are two way bindings happening?

$
0
0
First of all CanJS is a great framework, there is so much I love about it. But there is one thing that is killing me. That is two way bindings in form fields (the lack of).

At the moment the canonical way to do it seems to be listenening for field changes in the controller and then updating the value in the observer. This is ok in a simple example, but soon becomes a lot of work in a larger application. This is the kind of boilerplate that made us ditch move way from other frameworks into Can.

There is also this example, http://bitovi.com/blog/2013/01/weekly-widget-two-way-mustache-helpers.html But then again there is a lot of manual work there.

I feel that this should be a lot simpler, e.g. just declaring this binding in mustache should suffice. <input name="firstname" {{value model.firstName}} />. Or some kind of helper like this that works out of the box.

So my question is: what is your stand on this? Is the philosophy of the project not to go there (as in Backbone) or are you planning to tackle this in the near future?

Thanks
Sebastian

Viewing all articles
Browse latest Browse all 3491

Trending Articles