backbone-forms icon indicating copy to clipboard operation
backbone-forms copied to clipboard

Allow accessing model attributes from templates.

Open alemangui opened this issue 11 years ago • 0 comments

Hello,

I was wondering if it would be good to allow accessing the model's attributes directly from the template without the need of explicitly setting the templateData. I imagine this case is among the most common ones.

To exemplify, this fiddle tries to access the firstName attribute of the Backbone model the form is bound to: http://jsfiddle.net/WGg32/1/

In order for it to work, it must explicitly set the templateData: http://jsfiddle.net/k4d73/1/

Would something like this be of interest?

alemangui avatar Mar 08 '14 10:03 alemangui