Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在angularJS中使用智能表进行排序_Angularjs_Smart Table - Fatal编程技术网

无法在angularJS中使用智能表进行排序

无法在angularJS中使用智能表进行排序,angularjs,smart-table,Angularjs,Smart Table,我正在使用智能表,但无法对表进行排序,以下是我的代码 <div ng-app="app"> <div ng-controller="app-controller"> <table st-table="EmployeeDetails" class="table table-striped table-hover" st-safe-src="EmployeeData"> <thead&g

我正在使用智能表,但无法对表进行排序,以下是我的代码

<div ng-app="app">
        <div ng-controller="app-controller">
            <table st-table="EmployeeDetails" class="table table-striped table-hover" st-safe-src="EmployeeData">
                <thead>
                    <tr>
                        <th st-sort="EmployeeName">Employee Name</th>                       
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="employee in EmployeeData">
                        <td class="col-xs-2">
                            <small>{{employee.EmployeeName}}</small>                           
                        </td>                        
                    </tr>                  
                </tbody>
            </table>
        </div>
    </div>
    <script type="text/javascript">
        var app = angular.module('app', []);
        app.controller('app-controller', ['$scope','$http', function ($scope,$http) {
            $http.get('/Data/EmployeeDetails.json').success(function (data) {              
                $scope.EmployeeData = data;
            }).error(function () {
                alert('error');
            });
        }]);       
    </script>

员工姓名
{{employee.EmployeeName}
var-app=angular.module('app',[]);
app.controller('app-controller',['$scope','$http',函数($scope,$http){
$http.get('/Data/EmployeeDetails.json').success(函数(数据){
$scope.EmployeeData=数据;
}).错误(函数(){
警报(“错误”);
});
}]);       
有人能告诉我到底是怎么回事吗?我已经引用了angular.js和smart-table.js

<script src="../Scripts/angular.js"></script>
    <script src="../Scripts/smart-table.js"></script>

您应该在ng repeat中使用“EmployeeDetails”


NG



谢谢

有人知道答案吗,请发帖
<tr ng-repeat="employee in EmployeeDetails">
<tr ng-repeat="employee in EmployeeData">