<tr @*ng-repeat="r in rvm"*@ @*>
<td>
<select ng-model="ID" ng-options="c.ID as c.Name for c in customer" ng-change="GetAccountBalance($index)" style="width:150px;height:22px;" name=" tCustomer">
<option value="">Select Customer</option>
</select>
$scope.GetAccountBalance = function (index) {
var getAccountBalance = ReceiptsService.GetAccountBalance($scope.ID);
var id = $scope.ID;
alert(id);
but my requirement is adding new row on dropdown change
<tr ng-repeat="r in rvm">
<td>
<select ng-model="ID" ng-options="c.ID as c.Name for c in customer" ng-change="GetAccountBalance($index)" style="width:150px;height:22px;" name=" tCustomer">
<option value="">Select Customer</option>
</select>
js
$scope.rvm = [{}];
$scope.GetAccountBalance = function (index) {
if ($scope.rvm.length == (index + 1)) {
$scope.rvm.push({
});
}
var getAccountBalance = ReceiptsService.GetAccountBalance($scope.ID);
var id = $scope.ID;
alert(id);
am able to add new row by using this code , but am not getting selected id
how to selected dropdown id,
if i remove ng repeat am getting id ,