<https://lh3.googleusercontent.com/-qgs24ZN1viA/WWIcNQRlkPI/AAAAAAAAADI/GXT3KN9nQYo3TpYb6-l-_MGfKqXPMD1QgCLcBGAs/s1600/cart9.PNG> I have create a shopping website in which user click on the addToCart button product is add into the cart and i have to disabled a clicked button but in my case all the button is disabled how to fix this issue? This is my HTML Code:-
<a class="w3-btn w3-red" ng-model="item.cart" ng-click="isDisabled || addProductInCart($index,list)" ng-disabled="isDisabled">Add To Cart </a> //Here our controller code:- /** * @Summary:addProductInCart , to add prodduct in cart. * @param: index, items * @return: NA * @Description: */ $scope.item = {}; $scope.prouctInCartList = []; $scope.totalAmountDisplay = 0; $scope.countProducts = 0; $scope.isDisabled = false; $scope.addProductInCart = function(index, item) { $scope.isDisabled = true; var data = { index :index, cart : item } $rootScope.prouctInCartList.push(data);} -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.