ng-table Sorting using Angular Example

Today, We want to share with you ng-table Sorting using Angular Example.In this post we will show you Angularjs table columns sorting with ng-table example, hear for Angularjs sort table columns using ng-table example we will give you demo and example for implement.In this post, we will learn about ng-table custom pagination with an example.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

Snippet Contents

ng-table Sorting using Angular Example

There are the Following The simple About ng-table grouping Full Information With Example and source code.

As I will cover this Post with live Working example to develop Angularjs sortable table with ngTable module example, so the ng table angular 7 is used for this example is following below.

AngularJS ng-table Sorting Example

Angular is a platform for building mobile & desktop web Based user friendly and light weight applications.Angular,It’s TypeScript-based open-source Angularjs web application framework.


<!DOCTYPE html>
<html xmlns="">
AngularJs Sort Table Columns Example -
<script src=""></script>
<link href="" rel="stylesheet" media="screen">
<link rel="stylesheet" href="">
<script src=""></script>
<script type="text/javascript">
var angularTutorialApp = angular.module("ngtableModule", ["ngTable"]);
angularTutorialApp.controller("ngtableController", function ($scope, $filter, ngTableParams) {
$scope.members = [
{ name: "Gondaliya Keyur", age: 10, address: 'Rajkot' },
{ name: "Sejal Ramani", age: 30, address: 'Diu' },
{ name: "Parag Shukla", age: 29, address: 'Diu' },
{ name: "Nilesh Chovatiya", age: 25, address: 'Bangalore' },
{ name: "Bharat Sakhiya", age: 27, address: 'Surat' },
{ name: "Sachin Tendulkar", age: 38, address: 'Rajkot' },
{ name: "Krishna Nogboys", age: 25, address: 'Kakinada' },
{ name: "Ravi Dhameliya", age: 7, address: 'Rajkot' },
{ name: "Ghetiya Neha", age: 22, address: 'Vijayawada' },
{ name: "Nilesh Donga", age: 23, address: 'California' },
{ name: "Pramit Shah", age: 34, address: 'Atlanta' },
{ name: "Jigar Shah", age: 29, address: 'Repalle' },
{ name: "Pratik Shah", age: 19, address: 'Gondal' },
{ name: "Jalpa Pansuriya", age: 27, address: 'Surat' }
$scope.membersTable = new ngTableParams({
page: 1,
count: 5
}, {
total: $scope.members.length,
getData: function ($defer, arguments) {
$ = arguments.sorting() ? $filter('orderBy')($scope.members, arguments.orderBy()) : $scope.members;
$ = $ - 1) * arguments.count(), * arguments.count());
<body ng-app="ngtableModule">
<div ng-controller="ngtableController">
<h2>AngularJS ng-table Sorting Example</h2>
<table ng-table ="membersTable" class="table table-bordered table-striped">
<tr ng-repeat="member in data">
<td data-title="'Name'" sortable="'name'">{{}}</td>
<td data-title="'Age'" sortable="'age'">{{member.age}}</td>
<td data-title="'Address'" sortable="'address'">{{member.address}}</td>

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about angularjs data table.
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.

Related FAQ

Here are some more FAQ related to this Article:

  1.   Simple PHP Create Custom Captcha Generator
  2.   PHP Creating Dynamic Directory (Folder) Example
  3.   Table with CSS Styles using Angular Example
  4.   VueJS Hello World First Application
  5.   ng-table Pagination using Angular Example
  6.   Difference Between Managed and Unmanaged Code in C#.NET
  7.   JQuery Expand Collapse Menu Example
  8.   Registration Form Validation using Ajax in Codeigniter
  9.   Vuejs check if Element Exists Example
  10.   ng-table Filtering Sorting Paging using Angular Example