无法在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">