The first simple thing I can imagine is a filter...
You can implement a filter that returns only the first n elements in an
array, passed as an argument. Then in the "show more product" button, you
can change the variable that hold the number of products showed, and you
are done: ng-repeat will be re evalutated, showing more product


2014-03-29 16:51 GMT+01:00 Dhruv Taneja <[email protected]>:

> I am trying to create an imitation of an e commerce portal using Angular.
> The products are displayed in a <div> tag and are repeated for all the
> products from some file using ng-repeat.
> But I want to halt the repeat process after a certain number of product
> divs, say 10, and show a load more products button. And when clicked, it
> should load more products, as it was doing earlier. How can I achieve this?
>
>
> <https://lh6.googleusercontent.com/-Kt6s_-UeEOg/UzbsCDobF1I/AAAAAAAAAPM/HKz22h7M65I/s1600/repeat.JPG>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to