I am looking for an implementation of the bootstrap grid with rows and device sensitive columns within the {{#each}} iterator of the Ember Handlebar template.
There doesn't seem to be a way to look up the iterator index value to add bootstrap rows.
I found this thread, but the solution doesn't seem to work with relational models. How to render a (Twitter Bootstrap) grid using Ember.js and Handlebars.js?
My model has 2 objects (populated from the server using RESTAdapter).
Container Object
- id
- name
- pictures (linked using DS.hasMany)
Item Object
- id
- name
- container (linked using DS.belongsTo)
I need this when viewing a single container which may contain many items. Here is the desired output (edited from other SO issue):
<h2>Container Name</h2>
<div class="row-fluid">
<div class="col-md-4">Item #1 (row #1 / column #1)</div>
<div class="col-md-4">Item #2 (row #1 / column #2)</div>
<div class="col-md-4">Item #3 (row #1 / column #3)</div>
</div>
<div class="row-fluid">
<div class="col-md-4">Item #4 (row #2 / column #1)</div>
<div class="col-md-4">Item #5 (row #2 / column #2)</div>
<div class="col-md-4">Item #6 (row #2 / column #3)</div>
</div>
<div class="row-fluid">
<div class="col-md-4">Item #7 (row #3 / column #1)</div>
</div>