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?

零下一度
Release: 2017-06-25 09:29:57
Original
1658 people have browsed it

Interface structure

$scope.DataList = [
    {
        "dataA":"numA",
        "dataB":"numB"a
    },{
        "dataA":"numA",
        "dataB":"numB"
    },{
        "dataA":"numA",
        "dataB":"numB"
    }
]
Copy after login

html

<ul><li ng-repeat="item in DataList"><span>{{item.dataA}}</span>  //显示字段 dataA<input type="text" ng-model="{{item.dataB}}"></input>  //操作 dataB 这个字段</li><ul>
Copy after login

js

$scope.DataList;    //直接提交这个数组就可以了
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template