jeudi 26 mars 2015

Using ember-idx-tabs panel inside an each block

I'm trying to use the ember-idx-tabs addon on my app. My associations are as follow:


Practice ->* PracticePart -> Part


On the Practice show template I would like to show a tab for each PracticePart. I came up with



{{#em-tabs selected-idx=tab_idx}}
{{#em-tab-list}}
{{#each practicePart in practiceParts}}
{{#em-tab}}{{practicePart.part.symbol}}{{/em-tab}}
{{/each}}
{{/em-tab-list}}

{{#each practicePart in practiceParts}}
{{#em-tab-panel}}
{{practicePart.part.symbol}}
{{/em-tab-panel}}
{{/each}}
{{/em-tabs}}


The problem is I'm getting only the tabs, the panels are all hidden (display: none). If I dont iterate, but instead add some em-tab-panels manually they are shown correctly and behave as expected.


I'm guessing its something I'm not doing well, cause I'm just learning ember.js, I'd appreciate any help!!!





Aucun commentaire:

Enregistrer un commentaire