Angularjs日期格式问题 [英] Angularjs date format issue

查看:99
本文介绍了Angularjs日期格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从angularjs中的webservice接收数据对象。数据对象有日期数据类型。

当我在angularjs方法中调试时,它像字符串一样/ Date(1464238800000)/



角度代码是

I am recieving data object from webservice in angularjs. data object has date data type.
when i debug in angularjs method it coming as string like "/Date(1464238800000)/"

Angular code is

$scope.Data = data.Details.Data;





实际日期值是:05/26/2016 10:30:00

如何在angularjs中获得此日期?



请帮我这个



我尝试过:





actual date value is : "05/26/2016 10:30:00"
how can i get this date in angularjs?

Please help me this

What I have tried:

$http({
   method: 'GET',
   url: resourceLoadUrl,
   headers: { 'Content-Type': 'application/json' },
   async: false,
  }).success(function (data, status) {
           $scope.Data = data.Details.Data;
    }).error(function (data, status) {
  });

推荐答案

scope.Data = data.Details.Data;
scope.Data = data.Details.Data;





实际日期值为:05/26 / 2016 10:30:00

如何在angularjs中获得此日期?



请帮帮我这个



我尝试过:





actual date value is : "05/26/2016 10:30:00"
how can i get this date in angularjs?

Please help me this

What I have tried:


http({
method:' GET'
url:resourceLoadUrl,
header:{' Content-Type'' application / json'},
async: false
})。success( function (data,status){
http({ method: 'GET', url: resourceLoadUrl, headers: { 'Content-Type': 'application/json' }, async: false, }).success(function (data, status) {


scope.Data = data .Details.Data;
})。error( function (数据,状态){
});
scope.Data = data.Details.Data; }).error(function (data, status) { });


这篇关于Angularjs日期格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆