dimanche 23 octobre 2016

EmberJs : #each loop not detecting the array defined in the component

This might seem simple, but i am missing something here. Please help me out.

in the component's JS file -

weekShorts: computed(function() {
  return new Array('S', 'M', 'T', 'W', 'T', 'F', 'S');
}),

and then in hbs file -


  <td>  </td>

  <td>
    No items in days
  </td>


The output is always "No items in days".

Although, just printing anywhere else, displays

S,M,T,W,T,F,S

Why is the #each loop not executing the loop over the array at all?




Aucun commentaire:

Enregistrer un commentaire