declare a variable called filter
filter: boolean= false;
then use ngModel in the html part to access and assign its value.
<input type="checkbox" [(ngModel)]="filter" (click)="filterData()">
it is called by the filterData () function, which you can use to perform all your functions.
filter(){
this.filter = !this.filter;// this will change value of it true and false
}
declare more variable filter1: boolean