I am attempting to eliminate a specific item from an array variable within AngularJS's scope by using the item's index.
If you believe this question is a duplicate, please check out the footnote links for related questions that were not exactly the same. Any help in finding identical questions would be greatly appreciated!
Here is my example:
http://jsbin.com/seyaje/3/edit?html,output
The issue I'm facing is that the index does not update automatically every time, leading to the deletion of the wrong item or failing to delete the intended item if the index is out of bounds.
In my case, I prefer passing the index as it saves me the hassle of repeatedly figuring out indexes (assuming the index is correct!)
How can I resolve this using AngularJS 1.25? Your helpful advice is always welcome!
This question may resemble the following:
AngularJS remove item from scope How to remove an Item from scope AngularJS
My objective is somewhat similar to:
or http://plnkr.co/edit/51SNVMQjG3dsmpYI5RyY?p=preview
A similar unanswered question (locating and deleting by index):remove clicked item angularjs