I am creating a simple inventory management application using AngularJS, Firebase with AngularFire library.
I have a problem when trying to update Unit number when user does Import/Export action. I don't know how to retrieve the id / index of each product when running in a loop.
My intention is: User can choose product from autocomplete list (Angucomplete-alt library) to do Import/Export, then enter number of units. He can add the product to the list of products which will be used for 1 Import/Export. When he click "Change", the loop will run and update the unit number for each product.
Please help me with the function, thank you very much.
This is my sample at [Plnkr.co][1]
[1]: http://plnkr.co/edit/UovmBcNjyk3w7FW3NbMC?p=preview