I have a JS object like this:
[
{
selected: true,
itens: [1, 2, 3]
},
{
selected: true,
itens: [4, 5, 6]
},
{
selected: true,
itens: [7, 8, 9]
},
{
selected: true,
itens: [10, 11, 12]
}
]
It is a list of objects that have sublists. (this is just a simplified form of my real structure)
I would like to print many divs, one for each sublist item. It would be like this:
<div>1</div>
<div>2</div>
<div>3</div>
<div>...</div>
<div>11</div>
<div>12</div>
But i do not want wrap the parent items in a external div or another element. And i also would like to hide the subitems of parents with 'selected' attribute false.
How can i do this with angular ngRepeat directive?
UPDATE I'm trying to list the elements with bootstrap 'row' and 'col' classes. each column is 4 bootstrap columns wide.
If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.
this is from boostrap documentation.
The resoult should be like this
<div class="row">
<div col-md-4>1</div>
<div col-md-4>2</div>
<div col-md-4>3</div>
<div col-md-4>...</div>
<div col-md-4>11</div>
<div col-md-4>12</div>
</div>