javascript - My model doesn't bind on my checkbox -


this checkbox. have model there named selall.

<input type="checkbox" ng-click="selectall(filteredtitles, cpportfolioitem)" ng-model="selall"> 

now have button needs remove checkmark on checkbox.

<button class="btn-success btn " ng-click="updatetitlestatus(4)"> 

note have function on ng-click of button put $scope.sellall = false; inside function checkmark still there pressed it. how can uncheck checkbox? thanks.

you can using following logic check , uncheck checkbox based on previous state $scope.selall = !$scope.selall in ng-click function of button

here working plunker code

http://embed.plnkr.co/mjognxot8p1oo9dcmuer/preview

hope helps!!!!!!


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -