angular.js - How to control the number of ngrepeat outputs
过去多啦不再A梦2017-05-15 17:03:34
0
3
506
Use $http to get a lot of data from the background, but I only want to repeat 10 items on the page. Is there a controlled number of filters in ngrepeat? How should I write it?
Read the documentation carefully, you will always gain something:
http://docs.ngnice.com/api/ng/filter/limitTo
If you want to loop the last 3, you can write like this