I have two arrays. One is items and the other is items2.
And if items2 is an empty array I only want to show the one item in items. How can apply a condition to the filter limitTo?
The limitTo should only be considered if a certain condition is met.
Thank you!
Ternary expression will help you!
Example: limitTo : !items2.length ? 1 : n