获得动态ng模型值的值

时间:2016-05-12 18:13:03

标签: angularjs

我想在范围varialbe中获得ng-model的值

<div class="form-group" data-ng-repeat="wing in getNumber(app.wingnum) track by $index">
            <label for="InputMessage">Enter name of Wing </label>
                <div class="input-group"  >
                    <input type="text" class="form-control" name=""                               placeholder="Enter Name of wings" 
                    ng-model="control[$index]" 
                     ng-keyup="addNewWing()"required/>
                    </div>
                 </div>

1 个答案:

答案 0 :(得分:2)

由于它是您的ngModel - 您应该可以通过$scope.control[indexValue]

访问它