<template name="productForAuction">
{{> coin}}
<hr/>
<hr/>
<ul>
{{#each product}}
<div class="product {{selectedClass}} ">
Product : {{ name }} <br/>
Price : {{ price }}<br/>
winner : {{ winner }}<br/>
time : {{ time }}<br/>
Time left to BID: {{> timeleft}} <br/>
<input type="button" class="increment" value="Bid Now">
</div>
<br/>
{{/each}}
<hr/>
</ul></template>
I want the button(increment class) to be disabled if the timeleft
template returns 0. the below snippet is the timeleft
template.
<template name="timeleft">
{{ left _id }}
</template>
please don’t make confusion with the template. there is a space between left
and _id
. The helper is
Template.timeleft.helpers({
'left' : function(sessionKey){
return Session.get(sessionKey);
}});