How to use each input values ββin events ? I hope my lower code will explain you well.
HTML:
<template name="UpdateAge"> {{#each Name}} <div data-action="showPrompt"> <div> Some content </div> <div> <div> Some content </div> </div> <div> Name : {{name}} Age : <input type="text" name="age" value="{{age}}"/> //I need to access age values in event </div> </div> {{/each}} <template>
JS:
Template.UpdateAge.events({ 'click [data-action="showPrompt"]': function (event, template) { console.log(event.target.age.value);
I do not know if my approach is suitable for passing the values ββof the parameters of events , so suggestions are welcome.
source share