**Component.html**

```
  <div class="tab-content">
     <div class=" fl-wrap filter-tags" *ngIf="selected">
         <label *ngFor="let category of selected.categoryServicemodel; let i = index">
            <input type="checkbox" (click)="onCheck(category)"
                class="form-control" value="!!category.isActive"
                (ngModelChange)="category.isActive = $event ? 1 : 0"
                name="index{{i}}"
            >
            {{category.serviceName}}
         </label>
     </div>
  </div>

```

**This is my component.ts**

```
export class Component {
 selectedServe: [];

   constructor(){
    this.service.getAllCategories()
       .subscribe((categories:any )=>{           
         this.values = categories.json();
         console.log(this.values);
       })

  this.service.getAllServices()
      .subscribe((services:any )=>{
        this.serv = services.json();
        console.log(this.serv)
      })
    }

 onCheck(service){
  this.selectedServe = service.serviceId;
  console.log(this.selectedServe);
 }

```

[![checkbox](https://i.stack.imgur.com/hwDbU.png)](https://i.stack.imgur.com/hwDbU.png)

Now i have multiple checkbox when i select checkbox each value id should be stored in a array format variable