FWQ
Angularjs过滤器完成排序功能实例详解
本文主要和大家详细介绍了angularjs使用过滤器完成排序功能,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,希望能帮助到大家。 nbsp;html> <meta> <title></title> <script></script> <link> <script> angular.module('myApp',[]) .service('data',function(){ return [ {id:1234,name:'ipad',price:3400}, {id:1244,name:'aphone',price:6400}, {id:1334,name:'mypad',price:4400}, {id:8234,name:'zpad',price:8400} ]; }) .controller('myController',function($scope,data){ $scope.data=data; $scope.change=function(order){ //$scope.orderType=''; $scope.order=order; if($scope.orderType==''){ $scope.orderType='-'; }else{ $scope.orderType='';…