Hi,
Code: Select all
In the Ionic/AngularJs PizzaCreator example, you show how to insert a line in a grid when choose an ingredient and click the "add" button. Suppose, now, the user wants to remove an ingredient from the grid. I tried this, inserting a "delete" button in the row, and a method deleteItem() attached to the burron's ng-click directive. To remove the ingredient, I know that first I have to remove it from the $scope.customList array using the "delete" operator: delete $scope.customList[INDEX]. My question is:
1)How to get the INDEX of the item to be deleted in the Grid?
2) How to remove the deleted ingredient's line from the Grid?
Thank You.