Sorting data in Angular : <pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;
&lt;/script&gt;
&lt;style&gt;

table{
border:2px solid black;
border-collapse:collapse;
font-family:Arial;

}

td{
    border:2px solid black;
    padding:5px;
}

th{
    border:2px solid black;
    padding:10px;
}
&lt;/style&gt;


&lt;/head&gt;

&lt;script type="text/javascript"&gt;

var app=angular.module("myApp",[]);
app.controller("likeDislikeCount",function($scope)
{
    var technology=[
                {name:"C",like:0,Dislike:0},
                {name:"Python",like:0,Dislike:0},
                {name:"Java",like:0,Dislike:0},
                {name:"Angular",like:0,Dislike:0}
];
    $scope.technology=technology;

    $scope.rowLimit=1;
    $scope.selectCol=name;

    $scope.increeseLike=function(technology1){
        technology1.like++;
    };

    $scope.increseDisLike=function(technology1){
        technology1.Dislike++;
    };

}   
);
&lt;/script&gt;


&lt;body  ng-app="myApp"&gt;
&lt;div ng-controller="likeDislikeCount"&gt;
No. of rows to display :: &lt;input type="number" ng-model="rowLimit" min=0 max=4 /&gt; &lt;br&gt;&lt;br&gt;

order by &lt;select ng-model="selectCol"&gt;
    &lt;option value="name"&gt;Name ASC&lt;/option&gt;
    &lt;option value="like"&gt;LIke ASC&lt;/option&gt;
    &lt;option value="-Dislike"&gt;Dislike DSC&lt;/option&gt;

    &lt;/select&gt;
&lt;br&gt;&lt;br&gt;
    &lt;table&gt;

    &lt;thead&gt;
    &lt;th&gt;Name&lt;/th&gt;
    &lt;th&gt;LikeCount&lt;/th&gt;
    &lt;th&gt;DislikeCount&lt;/th&gt;
    &lt;th&gt;Click&lt;/th&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
    &lt;tr ng-repeat = "x in technology | orderBy:'selectCol'"&gt;

    &lt;td&gt;{{x.name}}&lt;/td&gt;
    &lt;td&gt;{{x.like}}&lt;/td&gt;
    &lt;td&gt;{{x.Dislike}}&lt;/td&gt;


    &lt;td&gt;&lt;button ng-click="increeseLike(x)"&gt;LIKE&lt;/button&gt;&lt;button ng-click="increseDisLike(x)"&gt;DISLIKE&lt;/button&gt;&lt;/td&gt;


    &lt;/tr&gt;
    &lt;/tbody&gt;

    &lt;/table&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>this code I am trying to show the table depending on order of any of name,like and dislike.When I will select any of one from dropdown It should the data according to that field.But its not working appropriately.
Please correct it completly and help me 
Thanks</p>
