Home >Web Front-end >JS Tutorial >How to get the corresponding modified value from the data generated by ng-repeat?

How to get the corresponding modified value from the data generated by ng-repeat?

零下一度
零下一度Original
2017-06-25 09:29:571656browse

Interface structure

$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;    //直接提交这个数组就可以了

The above is the detailed content of How to get the corresponding modified value from the data generated by ng-repeat?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn