am adding new row on clicking Plus(+),
i want to show Minus (-) to previous row ,if i click i want to delete that
particular row ,and continuosly for new row + , and for all previous row i want to show -(glypicon)
JS
var ReceiptsApp = angular.module('ReceiptsApp', []);
ReceiptsApp.controller('ReceiptsController', function ($scope) {
$scope.sample = [{
id: '1',
name: 'Bhanu',
Address: 'Moosapet',
Mobile: '9246100100'
}, {
id: '2',
name: 'Madhu',
Address: 'Uppal',
Mobile: '9000330653'
}, {
id: '3',
name: 'Geetha',
Address: 'Sanath Nagar',
Mobile: '9912340519'
}];
$scope.rvm = [{}];
$scope.addRow = function (index, c) {
if ($scope.rvm.length == (index + 1)) {
$scope.rvm.push({
});
}
}
});
Vaibhav DeshmukhRank #5,346 · 302 reputationPosted Sep 26, 2016, 11:28 PM EDT
$scope.rvm.splice($index, 1);
}
suman goud159 reputationPosted Sep 26, 2016, 11:37 PM EDT
Krishna Rajput SinghRank #605 · 4K reputationPosted Sep 27, 2016, 12:22 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts