在ng-repeat中使用多个角度滤波器

时间:2017-04-18 08:24:21

标签: angularjs angular-filters

我有一个标准的JSON,我使用ng-repeat在div上输出。

[
 {
   "info": "CA",
   "label": "STATE",
   "displayLabel": "['pInformation']['State__c']",
   "type": "string",
   "group": "Custom Properties",
   "collapse": true,
   "editing": false
 },
 {
    "info": "2017-04-17T23:29:37.000Z",
    "label": "Date Time",
    "displayLabel": "['pInformation']['DateTime__c']",
    "type": "string",
    "group": "Custom Properties",
    "collapse": true,
    "editing": false
  },
 {
    "info": "2017-23-17T23:32:37.000Z",
    "label": "Date",
    "displayLabel": "['pInformation']['Date__c']",
    "type": "string",
    "group": "Custom Properties",
    "collapse": true,
    "editing": false
  }
]

<dl ng-repeat="fields in data.fields">
   <dd>{{fields.label}}</dd>
   <dd>{{fields.info}}</dd>
</dl>

如果我想为第2和第3个节点添加角度日期过滤器:

  • 第二名:约会:'MM-dd-yyyy HH:mm'
  • 3rd:date:'MM-dd-yyyy'

1 个答案:

答案 0 :(得分:0)

使用$ index:

$('.frameHolder').draggable()
相关问题