meteor - How to check a variable value within a template -


problem : want show different templates based on user selection.

question : there way check radio button selected using markup(spacebars) , not using click event on radio button value. following example of want do.

<template name="category">   <label class="radio-inline">     <input name="studentgroup" id="studentyes" value="true" type="radio"> yes   </label>   <label class="radio-inline">     <input name="studentgroup" id="studentno" value="false" type="radio"> no   </label> </template> 

within conditional block want check radio button selected can show correct template.

{{#if value}}    {{> studenttemplate}} {{else}}    {{> regulartemplate}} {{/if}} 

the way use click event value. there might community packages automate you, though.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -