I want the ng-repeat to run only when the photos.length > 1
Doing this doesn't seem to work:
<div ng-repeat="thumb in photos | photos.length > 1">
Is there any quick trick / elegant way to do this? I just need to check for array length and nothing else fancy.
I would hate to duplicate the array to another array by doing something like this
if (oldArray.length > 1)
newArray = photos;
else
newArray = [];
...and then do ng-repeat on newArray. This seems inefficient.
Thanks.