What is the best way to get and select values ββfrom the drop-down list (as well as in the radio) in Meteor. I created an assistant:
Template.categories.helpers({ categories: ["facebook", "news", "tv", "tweets"] });
and in html
... <select class="form-control" id="category"> {{> categories}} </select> ... <template name="categories"> <option disabled="disabled" selected="selected">Please Select</option> {{#each categories}} <option value="{{this}}">{{this}}</option> {{/each}} </template>
In the case of editing, I would like to evaluate it with the value coming from the database (for example, news) to be selected.
Thanks in advance.
source share