Break ng-repeat


listining json content with ng-repeat. but I want to add custom text every 3 item after…

how can I do it?


More information would be good.

Do you have control over Jason file??
What kind of custom text?? User inputs?

You could try something like

<div ng-if="$index > 0 && $index % 3 == 0">
every three items

<div ng-if="$index > 0 && $index % 2 == 0" class="ads">every three items</div>

this works…

@KimB I want to add ads.

That looks like every other item to me, and if that’s what you’re going for, ng-if="$odd" should suffice.