Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
View <select [(ngModel)]="viewby" (ngModelChange)="setItemsPerPage(viewby)"><option>3</option><option>5</option><option>10</option></select> records at a time.
<!doctype html> <html ng-app="plunker"> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.js"></script> <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script> <script src="example.js"></script> <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div ng-controller="PaginationDemoCtrl"> <table class="table"> <tr ng-repeat="row in data.slice(0, itemsPerPage)"> <td>{{row.name}}</td> <td>{{row.id}}</td> </tr> </table> View <select ng-model="viewby" ng-change="setItemsPerPage(viewby)"><option>3</option><option>5</option><option>10</option><option>20</option><option>30</option><option>40</option><option>50</option></select> records at a time. </div> </body> </html>