M
M
Maxim Ivanov2016-09-21 17:26:06
Angular
Maxim Ivanov, 2016-09-21 17:26:06

How to display a range of elements in Angular?

<span ng-repeat="process in processess">
            <span>{{ process.title }}</span>
</span>

Let's say I have 10 elements in the processess array, how can I specify in html that elements 1 to 3 are displayed
and how can I then indicate (for example, in another place) that 3 to 10 are displayed?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2016-09-21
@splincodewd

do it in the controller, form some kind of array there with the chunk of data that you need now. Controllers are just for such logic, and you do not need to load presentation logic into a passive view (template).

N
Nicholas, 2016-09-21
@healqq

option 1: filter limitTo: dock
option 2: make pagination to the required arrays yourself

M
Maxim Ivanov, 2016-09-21
@splincodewd

Worked great for me:
jsfiddle.net/sahilosheal/LurcV/39
stackoverflow.com/questions/16824853/way-to-ng-rep...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question