javascript - Rivets.js attribute depends on several fields -
for illustration have next piece of code in ejs:
<img src="<%= model.image %>" title="toggle: <%= model.brandname %> <%= model.productname %>" />
how can write in rivets.js template syntax? rv-title may help, should set 'toggle:' text model , create method concatenate brandname , productname. don't want it's not model's responsibility. ideas on how should work in rivets.js?
you utilize oneway binder accomplish this
http://rivetsjs.com/docs/guide/#binders
take @ reply @ how bind 2 values using rivets(like or condittion)? similar situation.
javascript templates ejs rivets.js
No comments:
Post a Comment