How do I properly implement Bootstrap carousel in Meteor? -


i'm migrating code blaze , have hit problem bootstrap carousel can't seem over.

i had following pre blaze set 1 of carousel items active kick whole thing off

<div class="item {{#if active_sponsor}}active{{/if}}"> 

as documented, no longer works blaze, i've tried modifying thing can think of

{{#if active_sponsor}}   <div class="item {{#if active_sponsor}}active{{/if}}"> {{else}}   <div class="item"> {{/if}} 

this lives within {{each sponsors}} block.

sadly, fails run error saying unexpected {{else}} (or, if remove {{else}} unexpected {{/if}}

what's correct way this. i'm using same pattern earlier change

from "using blaze" on github :

https://github.com/meteor/meteor/wiki/using-blaze#conditional-attributes-with-no-value-eg-checked-selected

so should use form instead, assuming active_sponsor property in current data context.

template.whatever.helpers({     isactive:function(){         return this.active_sponsor?"active":"";     } });  <div class="item {{isactive}}"> </div> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -