Select all check box on click of Button

I have ion-list inside this I have checkbox as ion-item and some more items. I have separate button called Select All. When I click om Select All button it should select all check box in the ion-list if I click again the same button it should unselect all check box.

Please provide me the logic or sample to achieve…

check this