Angularjs Table Pagination Example with Code

Today, We want to share with you angularjs table pagination.In this post we will show you How to do paging in AngularJS?, hear for Paging in AngularJS we will give you demo and example for implement.In this post, we will learn about angularjs smart table with an example.

AngularJS Table Pagination with Ng-Table

Syntax of AngularJS Table with Paginations

$scope.membersTable = new ngTableParams({
page: 1,
count: 5
}, {

total: $scope.members.length,

getData: function ($defer, params) {
	$ = $scope.members.slice(( - 1) * params.count(), * params.count());

Example of AngularJS Table with Paginations


<!DOCTYPE html>
<html xmlns="">
         AngularJs Table with Paginations Example -
      <script src=""></script>
      <link href="" rel="stylesheet" media="screen">
      <link rel="stylesheet" href="">
      <script src=""></script>
      <script type="text/javascript">
         var app = angular.module("ngtableApp", ["ngTable"]);
         app.controller("ngtableCtrl", function ($scope, ngTableParams) {
         $scope.members = [
         { name: "Raghav Chanagani", age: 10, location: 'Rajkot' },         
         { name: "Mayur Sorathiya", age: 30, location: 'Surat' },         
         { name: "Virat Antala", age: 29, location: 'Surat' },         
         { name: "Bhavika Kumar", age: 25, location: 'Kalavad' },         
         { name: "Shital Chandra", age: 27, location: 'Gondal' },         
         { name: "Krishna Prasad", age: 38, location: 'Rajkot' },         
         { name: "Surbhi Rayana", age: 25, location: 'Junagdh' },        
         { name: "Madhuri Dixit", age: 7, location: 'Rajkot' },         
         { name: "Geeta Sorathiya", age: 22, location: 'Delhi' },         
         { name: "Dharmesh Sorathiya", age: 23, location: 'California' },         
         { name: "Nilesh Sorathiya", age: 34, location: 'Ahemdabad' },         
         { name: "Chaggan Krishna", age: 29, location: 'Sugama' },         
         { name: "Ketu dharmi", age: 19, location: 'Guntur' },         
         { name: "Lila", age: 27, location: 'Gondal' }         
         $scope.membersTable = new ngTableParams({
         page: 1,     
         count: 5
         }, {
         total: $scope.members.length,
         getData: function ($defer, params) {
         $ = $scope.members.slice(( - 1) * params.count(), * params.count());
   <body ng-app="ngtableApp">
      <div ng-controller="ngtableCtrl">
         <h2>AngularJS ng-table Paginations Example -</h2>
         <table ng-table ="membersTable" class="table table-striped">
            <tr ng-repeat="member in data">
               <td data-title="'Name'">{{}}</td>
               <td data-title="'Age'">{{member.age}}</td>
               <td data-title="'Location'">{{member.location}}</td>

I hope you get an idea about Paginations in HTML table using AngularJS.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  cPanel custom PHP.INI File Configuration

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  PHP Laravel 6 Custom Error Page Example
  2. Read Also:  Get Laravel Route Parameters
  3. Read Also:  How to Convert String to Object in Angularjs?
  4. Read Also:  how to open new tab in react js Example
  5. Read Also:  Get Innerheight-Outerheight-Scrollheight Clientheight using JavaScript
  6. Read Also:  Bind Array List to Checkboxes using Angular Example
  7. Read Also:  Calculate the difference between two dates using PHP
  8. Read Also:  Laravel Tips Tricks and Techniques for Developers
  9. Read Also:  Table with CSS Styles using Angular Example
  10. Read Also:  Angular DataTable Pagination Searching Sorting in PHP