I have a ul li structure like below and need to add blank li after every second element, how its possible with ng-repeat in angular js.
<ul>
<li>content</li>
<li>content</li>
<li class="filler"></li>
<li>content</li>
<li>content</li>
</ul>
<ul>
<li ng-repeat="item in items">item.content</li>
</ul>
items.push( //push what you want...).fillerelement contain anything? Or it is just some kind of spacer? Maybe instead of modifyingDOMtree, you should try using styles? I.e defining a style forli:nth-child(2n)ng-class="{filler:!$index%3}"