Ember.js / access to parent array within each - nested each -


i have following model in ember.js:

 app.fraction.fixtures = [     {         id          : 200,         title       : "general",         list        : 100,         provider    : [400],          attributes  : [800,801]     }, {         id          : 201,         title       : "kinder preise",         list        : 100,         provider    : [400]     }  ]; 

each fraction has providers , attributes , each provider has services. want create table each provider provider.services rows , attributesas coloumns.

in template tried this:

 {{#each provider}}     <h3>{{title}}</h3>     <hr />      <table>        <thead>           <tr>              {{#each ../attributes}}                 <th> {{title}} nothing happend!!!</th>              {{/each}}           </tr>          </thead>           <tbody>            {{#each services}}               <tr>                  <td> {{title }}</td>                  {{#each attributes}}                     <td>{{value}}</td>                  {{/each}}               </tr>            {{/each}}          </tbody>        </table>    {{/each}} 

it seems path identifier "thing" not work here. there workaround?

in latest versions of ember how it:

 {{#each providers |provider|}}     <h3>{{provider.title}}</h3>     <hr />      <table>        <thead>           <tr>              {{#each attributes |attr|}}                 <th> {{provider.title}} should work</th>              {{/each}}           </tr>          </thead>     </table> {{/each}} 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -