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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -