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
How to add new empty row on dropdown change using angular
Sep 20 2016 5:09 AM
by using below code am adding new row on dropdown change,
if select option 'madhu' in dropdown ,adding new row with same selected madhu .if i select any dropdown madhu,all values are changing to madhu
how to fix this, iwant to add new empty row on dropdown change
<tr ng-repeat="r in rvm">
<td>
<select ng-model="customer.ID" ng-change="GetAccountBalance($index)" ng-options="c.ID as c.Name for c in customer" name="tCustomer">
<option value="">select Customer</option>
</select>
</td>
<td>
<select ng-model="ReceiptsViewModel.AccountId" ng-options="a.ID as a.Name for a in account" name="tDiscountAcc1" style="width:150px;height:22px;">
<option value="">Select Account</option>
</select>
</td>
<td>
<input type="text" ng-value="0.00" ng-model="ReceiptsViewModel.AdjustAmount" ng-change="GetTotalAmount()" class="input-large" name="tAdjustAmount" />
</td>
</tr>
js
$scope.rvm = [{}];
$scope.GetAccountBalance = function (index) {
var getAccountBalance = ReceiptsService.GetAccountBalance($scope.customer.ID);
var id = $scope.customer.ID;
alert(id);
if ($scope.rvm.length == (index + 1)) {
$scope.rvm.push({
});
}
Reply
Answers (
3
)
Reads data frm config file
How to SQLite working with EntityFramework 6?