【发布时间】:2017-11-27 05:24:15
【问题描述】:
我正在使用 angularJs,在从数据库中获取日期中,作为响应,我以这种格式得到“2017-11-25T18:30:00.000Z”日期。 角度控制器中的“2017-11-25”。我尝试了不同的建议,但没有奏效。 我只需要在脚本部分更改“jobBatchDate”格式。
谁能帮帮我? 谢谢:)
$scope.File_Request = function (jobCarrierName,jobFileType,jobBatchDate) {
// $scope. = [];
$scope.jobName = jobCarrierName;
$scope.jobFile = jobFileType;
$scope.batchDate = jobBatchDate;
$http({
method: 'GET',
url: '../fileReCreate/',
params: {"carrier": $scope.jobName,"filetype": $scope.jobFile,"batchDate":$scope.batchDate},
headers: {'Content-Type': 'application/json'}
})
.success(function (data, status) {
// $scope.scanformdetail = data;
alert(data.toString());
console.log("File Re-Create Response");
// $scope.dispense = true;
})
.error(function (data, status) {
alert("Error in Re-Creating File");
});
【问题讨论】:
-
你试过
data filter吗? -
@ved 是的,我曾想过这样做,但我需要在脚本部分将其隐藏在它到达 HTML 端之前
标签: javascript angularjs node.js