vendredi 11 octobre 2019

Conditional Render in Loop

This is my first ever project with ember.

I'm trying to render a language-changer component. So far it renders ok, but I would like to append a spacer after each language as long and it is not the last one .

It should look something like

DE | FR | EN ...etc where | is actually a div

This is what I tried...

<div class="col-4 text-right language-changer">
  
    
      <span></span>
    
      <button > 
      </button>
    
    
      <div class="spacer">|</div>
    
  
</div>

I read, that the if only works on properties... but how can I evaluate based on the current loop index?

What should I use instead of

 

Thanks for the help.




Aucun commentaire:

Enregistrer un commentaire