خرید بک لینک

Vote count: 0

I am new to angularjs , I have trying to create fixed Page links in dir-pagination-controls in angularjs I have try to use 'total-items=100' but not working , I am getting all my values from web services ,

What I have tried

   app.controller('listdata',['$scope', '$http', function($scope, $http) {
        $scope.xxxx = []; //declare an empty array
        data = [];
        function getResultsPage(pageNumber) {
            console.log('Please wait while data is loadind');
             $http({
                method: 'POST',
                url: ajaxurl,
                params: {
                    'action': 'get_xxxx',
                    'pageNumber': pageNumber,
                    'usersPerPage': $scope.usersPerPage
                }
            }).success(function (data, status, headers, config) {
                $scope.xxxx = $scope.xxxx.concat(data);
                $scope.totalUsers = 100;
             });
        }
        $scope.users = [];
        $scope.totalUsers = 0;
        $scope.usersPerPage = usersPerPage; // this should match however many results your API puts on one page
        getResultsPage(1);

        $scope.pagination = {
            current: 1
        };
        $scope.pageChanged = function(newPage) {
            console.log(newPage);
            getResultsPage(newPage);
        };
        $scope.sort = function (keyname) {
            $scope.sortKey = keyname;   //set the sortKey to the param passed
            $scope.reverse = !$scope.reverse; //if true make it false and vice versa
        };
    }]);

      <tr dir-paginate="xxxx in xxxxs|orderBy:sortKey:reverse|filter:search|itemsPerPage:usersPerPage" total-items=14 >
             <!--td>{{xxxx.id}}</td-->
              <td>{{xxxx.name}}</td>
              <td>{{xxxx.neighborhood}}</td>
            <td class="td-edit"><img src="<?php echo esc_url(get_template_directory_uri()); ?>/dist/images/edit.png"></td>
    </tr>

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 31 فروردين 1395 ساعت: 14:03

صفحه بندی