javascript - How to filter some consecutive elements from an array in AngularJS? -
if have array of names like
names = ["muneeb", "roshan", "umar", "kamil", "shamseer", "ajay", "jasar"]
and want filter array in way select 2 elements array has index of 3 , 4. how achieve angularjs ng-repeat? please advise.
can use ng-if on index, like
<div ng-repeat = "name in names track $index"> <div ng-if="$index === 3 || $index === 4">whatever want here</div> </div>
Comments
Post a Comment