根据值更改ng-repeat内的样式

时间:2017-07-02 08:57:10

标签: angularjs angularjs-ng-repeat

每次border-fat-bottom值更改

时,我都想将课程property添加到我的td中

这是我的数据

 vm.doubleBookings: [
    {
        "_id": "AA001",
        "property": "ATL-406",
        "name": "Torben Tenant"
    },
    {
        "_id": "AA002",
        "property": "ATL-406",
        "name": "whatever"
    },
    {
        "_id": "AA004",
        "property": "WAT-806",
        "name": "Torben Tenant"
    },
    {
        "_id": "AA005",
        "property": "WAT-806",
        "name": "whatever"
    },
    {
        "_id": "AA006",
        "property": "WAT-806",
        "name": "whatever"
    },
    {
        "_id": "AA007",
        "property": "ANA-202",
        "name": "whatever"
    }
    {
        "_id": "AA007",
        "property": "ZOK-440",
        "name": "whatever"
    }
]

这是我的ng-repeat

 <tr ng-repeat="bookings in vm.doubleBookings" class="start-text">
    <td class="border-thin-top">{{ bookings._id}}</td>
    <td class="border-thin-top">{{ bookings.property }}</td>
    <td class="border-thin-top">{{ bookings.name }}</td>
</tr>

所以...

ATL-406将有一个正常行,一个有胖底

WAT-806有两个正常行,一个有胖底

ANA-202会有一个胖底

1 个答案:

答案 0 :(得分:1)

componentWillMount
相关问题