S
S
Stepan2015-02-12 16:50:15
JavaScript
Stepan, 2015-02-12 16:50:15

How to set the number of elements called on click in ng-repeat in angular?

Does not work. Displays usually the number of how many elements

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Chernyshev, 2015-02-12
@delch

Reformulate, show the code, the question is not very clear.

E
Egor, 2015-02-12
@ByKraB

To set the number of elements that is displayed in ng-repeat, you need to make a separate function that will return the number of elements you need.
The controller should be something like this

$scope.getItems = function(limit){
var items = [];
//тут берем нужно количество элементов 
return items;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question