angular心得体会(一)

一、日期格式化
var today = new Date();
$scope.currentDate = $filter('date')(today, 'yyyy-MM-dd');
console.info( $scope.currentDate);
二、页面传值
$state.go("main.merchantCenterIndex.productCancellationApplication",{"productDetail":null});api

三、下载
window.open(ApiPath.api.downloadFile + '?fileId=' + eachList.fileId);it

四、请求后台服务io

productCancellationInfoServ.submitCancel($scope.productDto).then(
function(answer){
angular.alert("提交审核成功!");
$state.go("main.merchantCenterIndex.productCancellationApplication",{});
},function(error){
angular.alert("提交失败!");
}
);console

相关文章
相关标签/搜索