TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suman goud
NA
176
54.1k
drop down id not getting if i give ng-repeat in mvc Angular
Sep 20 2016 1:33 AM
am adding table row on changing of dropdown,
<tr ng-repeat="r in rvm" >
<td>
<select ng-model="Customer.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>
</td>
<td>
<input type="text" ng-model="AdjustAmount" name="tPendingAdjusted" />
</td>
<td>
<input type="text" ng-model="ReceiptsViewModel.AdjustAmount" name="tAmount" />
</td>
<td>
</tr>
JS
$scope.rvm = [{}];
$scope.GetAccountBalance = function (index) {
var getAccountBalance = ReceiptsService.GetAccountBalance($scope.ID);
var id = $scope.ID;
alert(id);
if ($scope.rvm.length == (index + 1)) {
$scope.rvm.push({
});
}
am able to add new row by using this code on dropdown change, but am not getting selected dropdown id(alert:undefined)
if i comment ng-repeat in tr , am getting id but not adding row
how to get id on ng-repeat
Reply
Answers (
8
)
custom attribute to set string lenght dynamically
Reads data frm config file