当此字段来自嵌套字段

时间:2016-07-13 00:20:02

标签: javascript angularjs ngtable

首先,我正在使用ng-table。问题是当这些字段来自嵌套的字段时,没有显示过滤器。我想按用户的字段名称或事件的字段标题进行过滤。这是我的json字段:

[
  {
    "id": 1,
    "date_in": "2016-06-15 09:07:20",
    "date_out": "0000-00-00 00:00:00",
    "event_id": 1,
    "event": {
      "id": 1,
      "title": "Programaci",
      "authorize": "pending",
      "user_id": 1,
      "room_id": 1,
      "user": {
        "id": 1,
        "name": "andres",
        "email": "andres@gmail.com"
      }
    }
  }, {
    "id": 2,
    "date_in": "2016-06-15 10:07:20",
    "date_out": "0000-00-00 00:00:00",
    "event_id": 1,
    "event": {
      "id": 1,
      "title": "tecnology",
      "authorize": "pending",
      "user_id": 1,
      "room_id": 1,
      "user": {
        "id": 1,
        "name": "peter",
        "email": "andres@gmail.com"
      }
    }
  }
]

您可以看到我的完整代码here

0 个答案:

没有答案