2
I’m using Angular with Admin LTE. I need to make a ng-repeat
where the li
within a ul
will repeat. I cannot repeat the ul
, but only the li
within that ul
. I can’t encompass those either li
with a parent element to make the repeat loop with ng-repeat
, because this is breaking the style once the css selector is capturing ul.timeline > li
.
My code is like this, and the commented lines indicate where I need to start and terminal the ngRepeat
:
<ul class="timeline" >
<!-- [ngRepeat status in os.status] precido repetir daqui -->
<li class="time-label">
<span class="bg-blue" ng-bind="status.nome"></span>
</li>
<li>
<i class="fa fa-check bg-green"></i>
<div class="timeline-item">
<h3 class="timeline-header">
Responsável: <strong ng-bind="status.pivot.usuario.nome"></strong>
</h3>
<div class="timeline-body">
<strong ng-bind="status.pivot.usuario.nome" /> realizou <span ng-bind="status.nome" /> em <strong ng-bind="status.pivot.data_inicio" />.
</div>
</div>
</li>
<!-- [endNgRepeat] até aqui -->
<li>
<i class="fa fa-clock-o bg-gray"></i>
</li>
</ul>
I can’t use an element encompassing li
I want to repeat, but I need them to repeat themselves within the commenting section. How to do this?
I don’t know if I got it right. You want to use the same
ng-repeat
with the two elementsli
?– Randrade
@Randrade I need you to
ng-repeat
start where you are commented[ngRepeat status in os.status]
and end where it is commented[endNgRepeat]
. However, I cannot "embed" with an element, to use ng-repeat, as the elements would take the format out of css.– Wallace Maxters