Is it possible to have pass a parameter from my template to a .helpers function parameter? I am trying the code below but I am always getting the error shown below. Thanks
Template.documentUpdate.helpers({
getDocID: function(dCode){
return docsIDArray[dCode];
}
});
in template:
<input type="hidden" id="docID" name="docID" value="{{getDocID(1) }}">
Error:
Exception from Tracker recompute function: Error: No such function: getDocID
Your syntax is incorrect, try this :
<input type="hidden" id="docID" name="docID" value="{{getDocID 1}}">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With