On click of my anchor link I want to toggle the list value which is by default initiated as 5 to 500.
that by default I want to show my list values only 5, on click on my link "more" I want to show all other list items, now the text of more will change as "less" kind of accordion, if we click on less now we need to show only 5 list item.
basically how to toggle the value of "limitTo" on click ? now I have 500 on on-click it needs to toggle as 5 when click second time, vs verse...
<div ng-controller="listsCtrl">
<div>
<a ng-show="lists.length > 5" ng-click="listLimit=500">more</a>
</div>
<div>
<ul ng-init="listLimit=5">
<li ng-repeat="list in lists | limitTo:listLimit">test values</li>
</ul>
</div>
</div>