简体   繁体   中英

display button when checkbox is checked

I am wondering how to display a button in the header bar when the checkbox is clicked in a listview. Help will be appreciated

Here is my codepen attempted

  `http://codepen.io/Hin/pen/KpGJZX`

There is the updated plunker : http://codepen.io/anon/pen/RPevdr

What I've done is modifying the isCheckboxChecked function. Now this function have a loop to check if one of all your data is checked. If one have it, it will be display because of your ng-hide

 $scope.isCheckboxChecked = function () {
      for(var i =0 ; i <$scope.tempData.length ; i++){
        if($scope.tempData[i].checked){
          return true;
        }
      }
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM