我正在开发一个jquery数据表,它链接到使用get填充表的loopback API,它已经初始化了所有功能,但现在我想添加一个日期范围函数来过滤我的日期列以显示指定日期之间的记录,我遇到了很多麻烦。这是代码:
app.controller('IwsManifestController', ['apirest', '$scope', '$rootScope', '$routeParams', '$location', 'Portal', '$http', '$cookies', function(apirest, $scope, $rootScope, $routeParams, $location, Portal, $http, $cookies) {
apirest.restManifest.find({}, function(item) {
console.log(item)
setTimeout(function() {
$('#tablegeneral').DataTable();
}, 1000);
$scope.manifest = item
});
}]);
app.directive('iwsManifestList', function() {
return {
restrict: "AE",
controller: "IwsManifestController",
templateUrl: "../html/Templates/reporting/iws-manifest-list.html"
}
});

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<table border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td>From:</td>
<td><input type="text" id="from" name="from"></td>
</tr>
<tr>
<td>To :</td>
<td><input type="text" id="to" name="to"></td>
</tr>
</tbody>
</table>
<table id='tablegeneral' class="display" cellspacing="0" width="100%">
</head>
<body>
</body>
<thead>
<tr>
<th>ID</th>
<th>HOST NAME</th>
<th>IWS APP NAME</th>
<th>INSTALL PATH</th>
<th>USERNAME</th>
<th>IWS VERSION</th>
<th>DATE INSTALLED</th>
<th>RESPONSE_STATUS</th>
</tr>
</thead>
<tfoot>
<tr>
<th>ID</th>
<th>HOST_NAME</th>
<th>IWS_APP_NAME</th>
<th>INSTALL_PATH</th>
<th>USERNAME</th>
<th>IWS_VERSION</th>
<th>DATE INSTALLED</th>
<th>RESPONSE_STATUS</th>
</tr>
</tfoot>
<tbody>
<tr ng-repeat="mmItems in manifest" on-finish-render="trade">
<td>{{mmItems.id}}</td>
<td>{{mmItems.hostname}}</td>
<td>{{mmItems.iwsAppName}}</td>
<td>{{mmItems.installPath}}</td>
<td>{{mmItems.username}}</td>
<td>{{mmItems.iwsVersion}}</td>
<td>{{mmItems.ts}}</td>
<td>{{mmItems.responseStatus}}</td>
</tr>
</tbody>
</table>
&#13;