Answer the question
In order to leave comments, you need to log in
How to add condition in ng-repeat (puzzle)?
There is an array of users - displayed by ng-repeat with a filter. Each user has an array of items - displayed inside the user by ng-repeat with a filter. There is an array with someStuff data.
Items are displayed 4 in a row.
It is necessary to display another row after every fourth row of items - the n-th element from someStuff
Here is the bar plnkr.co/edit/856TVTd0l1UnTImrZ7wp?p=preview
The final result from this bar would look like this (the inserted row is marked with a red line) https://gyazo .com/e021313a07ace76683ae503527f1dc09
Answer the question
In order to leave comments, you need to log in
everything is simple. Instead of solving this puzzle, just prepare the data as you need it for the presentation.
And yes, don't use collection filters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question