googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 61 forks source link

function calls in ExpressionSyntax and observable adapter #124

Closed mateusmaso closed 11 years ago

mateusmaso commented 11 years ago

Just wondering if it is a bad practice to allow method invocation inside MDV templates like this:

<h1> {{ user.get('name') }} </h1>

In my case, all my javascript core like models and collections comes from backbone.js. However I don't really tested if it plays nicelly with it way of triggering events, but surelly doesn't. Here is an example how model bind works:

user.on("change:name", callback)

Does anyone tried using MDV with backbone.js? If yes, is there any adapter for subscribe and publish like rivets.js style?

rafaelw commented 11 years ago

The ExpressionSyntax doesn't support calling expressions. There is a thread on the polymer-dev mailing list about working with Backbone:

https://groups.google.com/forum/#!searchin/polymer-dev/backbone/polymer-dev/zVacZYRuxPE/QfeM2hOc7akJ