angularjs中当ng-model是ng-repeat循环出来的子元素时,ng-model取不到值怎么破?
<li ng-repeat=“district in city.child”> <div class=“district”> <span class=“val”>{{district.name}}</span> <a href="#" class=“eidt” >编辑</a> <a href="#" class=“del” >删除</a> </div> <ul> <li class=“add-area add”> <input type=“text” ng-model=“areaVal” name="" id="" class=“add”> <input type=“button” ng-click=“addArea()” value=“添加区域”>{{areaVal}}</li> </ul> </li> 如上面areaVal是ng-repeat="district in city.child"生成的,然后在JS中取不到?(其实我也不确定是不是因为 这个原因) $scope.addDistrict = function(pid) { console.log($scope.areaVal); =>udf };