I am looking to make my meteor subscriptions dynamic/reactive. Right now, I have a page that subscribes to a collection of templates based on a template ID that is assed to it:
Meteor.subscribe('templates', templateId)
On the same page, I have a dropdown list of template names and ID's:
<p><label>Select Template</label></p>
<select id="templateSelect" name="templateSelect">
<option disabled selected> Select Template </option>
{{#each orderTemplates}}
<option value="{{this._id}}">{{this.templateName}}</option>
{{/each}}
</select>
I want the subscription variable templateId
to be equal to the option value of the template that I select. Anyone have any ideas? I'm really not sure where to begin with this one...
Thanks!