I like to work with meteor, but I have a problem I can\'t find a solution for.
In the template file I have this code:
Spacebars (meteor's templating library), much like Handlebars (that it is based on) doesn't execute arbitrary expressions like, say, angular.js's templates.
If you change the statement you're trying to write into a helper method, like so (feel free to pick a better name!):
<template name="klussenboard">
<h2>Klussen</h2>
<div class="klussenboard">
{{#each klus}}
{{#if isEnabled}}
<li>
<a class="startlink" href="#"><img src="/images/starten.png"></a>
</li>
{{/if}}
{{/each}}
</div>
</template>
You could then define the isEnabled helper in any client side .js file - say, client/klussenboard.js
like so:
Template.item.isEnabled = function() {
return this.status == 1;
}
So, this
, in helper functions is
This assumes that you are in a context where status
is a variable (which, based on your question, you are)
This would then reactively update whenever the status
variable changes.