# angularjs with data filter, pagination etc

Provider example and query about display data with filter, pagination etc in Angularjs.

# Angularjs display data with filter, pagination

<div ng-app="MainApp" ng-controller="SampleController">
    <input ng-model="dishName" id="search" class="form-control" placeholder="Filter text">
        <li dir-paginate="dish in dishes |  filter : dishName | itemsPerPage: pageSize" pagination-id="flights">{ {dish} }</li>
    <dir-pagination-controls boundary-links="true" on-page-change="changeHandler(newPageNumber)" pagination-id="flights"></dir-pagination-controls>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="pagination.js"></script>
<script type="text/javascript">

var MainApp = angular.module('MainApp', ['angularUtils.directives.dirPagination'])
MainApp.controller('SampleController', ['$scope', '$filter', function ($scope, $filter) {

    $scope.pageSize = 5;
    $scope.dishes = [
    'beans on toast',
    'battered mars bar',
    'crisp butty',
    'yorkshire pudding',
    'wiener schnitzel',
    'sauerkraut mit ei',
    'onion soup',
    'bak choi',
    'avacado maki'
    $scope.changeHandler = function (newPage) { };