我非常关注这个问题,我有一个返回一些数据的API,格式为
{
"data": {
"result": [
{
"start_date": "03-08-2017 00:00:00",
"end_date": "01-09-2017 23:59:59"
},
{
"start_date": "01-01-2017 00:00:00",
"end_date": "31-12-2017 23:59:59"
}
]
}
}
我想获取这些数据并让用户修改它们,所以基本上我的HTML就是这样的:
<table class="table" >
<thead>
<tr>
<th class="col-order">{{'START_DATE'| translate}}</th>
<th class="col-order">{{'END_DATE'| translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in insSupplies">
<td>
<exa-datepicker model="insSupplies[$index].start_date" disabled="true"
format="dd-MM-yyyy HH:mm:ss" readonlydata="false"></exa-datepicker>
</td>
<td>
<exa-datepicker model="insSupplies[$index].end_date" disabled="true"
format="dd-MM-yyyy HH:mm:ss" readonlydata="false"></exa-datepicker>
</td>
</tr>
</tbody>
</table>
和我的JavaScript:
CallToTheAPI.then(function(response) {
if(response.data != null){
$scope.insSupplies = response.data.data.result;
};
});
我在这里看到两个问题:
任何帮助?