接口结构
$scope.DataList = [
{
"dataA":"numA",
"dataB":"numB"a
},{
"dataA":"numA",
"dataB":"numB"
},{
"dataA":"numA",
"dataB":"numB"
}
]
html
<ul> <li ng-repeat="item in DataList"> <span>{{item.dataA}}</span> //显示字段 dataA <input type="text" ng-model="{{item.dataB}}"></input> //操作 dataB 这个字段 </li> <ul>
js
$scope.DataList; //直接提交这个数组就可以了