How Do I Nest Meteor Spacebars Templates? -
i'm using bundle called autoform.
{{> afquickfield name="propertyinfo.zipcode" placeholder="xxxxx" class="form-control track-order-change"}}
it renders label , input element.
i have session variable:
session.set("zipcode", //something dynamic);
i have registered helper:
handlebars.registerhelper("zipcode", function(){ homecoming session.get("zipcode"); })
i work:
{{> afquickfield name="propertyinfo.zipcode" value="{{zipcode}}" placeholder="xxxxx" class="form-control track-order-change"}}
first prepare global helper read:
template.registerhelper("zipcodehelper", function(){ homecoming session.get("zipcode"); })
then prepare afquickfield little:
{{> afquickfield value=zipcodehelper class="form-control track-order-change"}}
refer gh issue: https://github.com/aldeed/meteor-autoform/issues/210
meteor spacebars
No comments:
Post a Comment