Delete selected row with ng-click="delete($event)"
See original GitHub issueHow do you use delete($event)
to remove a checked row from the table?
In my app.js I have the following:
$scope.delete = function(item) { var index = $scope.data.indexOf(item); $scope.data.splice(index, 1); }
But this only removes the last item
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to delete the row in which a ng-click is located?
What is the best way to do this? Do I need to send the row as a parameter to deleteCustomer somehow? Do I...
Read more >How to delete an item or object from the array using ng-click
The task is to delete the item from the list when the button is clicked. This all should be done by using ng-click....
Read more >Delete Selected Row on click of delete button - Wijmo
I'm trying to delete entire selected rows (which i'm getting from getSelectedRows() function and my row contains both readonly and editable ...
Read more >AngularJS: Delete Table Row tr on button click - Codepedia.info
Here on click of delete button our deleteRow() function gets fire and using splice we remove the selected rows. ... Conclusion: Directive ng- ......
Read more >Part 6: Delete record by button click in Angular - YouTube
CRUDOperations #SpringBoot # Angular #StudentApplicationThis is how to delete selected student record by clicking delete button in angular.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All the selected items will be placed in your model. So if you have
Whenever an item is selected it will be pushed on to the
selected
array. If you want to delete all the selected items just loop through theselected
array.This is only a client side delete. If you want to delete them on the back end then just send a
DELETE
request for each selected item.You are a hero, thank you very much!