【发布时间】:2020-05-07 07:27:11
【问题描述】:
我有一个类似这样的 json 值
this.data = {"eoiStatistics": [
{
"dateRange": {
"explicitStartDate": "1997-01-01T00:00:00",
"explicitEndDate": "2019-07-01T00:00:00"
},
"outstandingApplicationCount": 0.0,
"pendingApplicationCount": 24.0,
"approvedApplicationCount": 0.0,
"declinedApplicationCount": 0.0,
"closedApplicationCount": 0.0 }]}
当我在应用程序中使用 json 管道 {{data | json}} 显示它时,它会像这样显示
{"eoiStatistics": [
{
"dateRange": {
"explicitStartDate": "1997-01-01T00:00:00",
"explicitEndDate": "2019-07-01T00:00:00"
},
"outstandingApplicationCount": 0,
"pendingApplicationCount": 24,
"approvedApplicationCount": 0,
"declinedApplicationCount": 0,
"closedApplicationCount": 0
}]}
所以如果我的值为 24.0 它显示 24 ,我知道 .0 没有任何值,但我需要在我的应用程序中显示它。有办法吗?
【问题讨论】:
标签: html css angular pipe less