I got this array of data:
$scope.domainRows = [
{ domainName: 'example1.com', domainDescription: 'example1.com desc'},
{ domainName: 'example2.com', domainDescription: 'example2.com desc'},
];
These rows are display as table on UI and user clicks on delete row2 and row2 has this info
{ domainName: 'example2.com', domainDescription: 'example2.com desc'}
Is there anyway that I can use AngularJS filter to get the index of row2? Should have the way to do it in AngularJS filter but couldn't figure out. Need your help. Thanks -k
With pure JavaScript.
The code is in vanilla JavaScript format so that it can run on the snippet for demo. You need to convert it to Angular format to use in your project but it is just a little edit.