mercredi 11 février 2015

Why do I need to prefix all properties in my templates with model.?

To access a model property in a template I was simply doing:



{{name}}


As explained in the guide


I have now moved to ember-cli@0.1.12, with ember@canary (1.12.0-beta.1+canary.50206d0f), jquery@2.1.3, handlebars@2.0.0, and somehow I find myself forced to prefix all properties with model.. This happens for straight properties, like:



{{model.name}}


And bound properties, like:



{{view "verifiedEmail" emailBinding="model.email" verifiedBinding="model.isEmailVerified"}}


Is this expected? Where is this documented? This is really a pita, because that means lots of changes in my templates.


I recall reading somewhere that object proxying was getting deprecated, but I can not find the reference to it anymore.





Aucun commentaire:

Enregistrer un commentaire