Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.removeProduct = function () {
- //look through current discount's products for a match with the product clicked on
- for (var i = 0; i < $scope.currentDiscount.DiscountProducts.length; i++) {
- //if the id's are the same
- if ($scope.currentDiscount.DiscountProducts[i].ProductCategoryId=== $scope.currentProduct.ProductCategoryId) {
- //remove it
- $scope.currentDiscount.DiscountProducts.splice(i, 1);
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement