title: How can I make multiple checkboxes checked in Angular where checkbox value is in one column of database with csv?
body: <p><code>editStatusObj.categories</code> values comes from database like (1,15,23) in one column, if there is only one value available then it shows checkbox checked, but how can I show multiple checked using multiple values in angular?</p>
  
  <p><strong>edit-status.component.html</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;
    &lt;label *ngFor="let statusCategoryObj of statusCategoryObj"&gt; 
      &lt;mat-checkbox  value="{{statusCategoryObj.categorytitle}}" [checked]="statusCategoryObj.id == editStatusObj.categories" name="categories" (change)="onCheckboxChange(statusCategoryObj,$event)"&gt;
        {{statusCategoryObj.categorytitle}}&lt;/mat-checkbox&gt; 
    &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>edit-status.component.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>editStatusObj : Status = new Status();
  statusCategoryObj : Category[];
  
  ngOnInit() {
   const id = +this.route.snapshot.paramMap.get('id');
    this.statusService.editStatusDetailsById({'id': id}).subscribe(
      (data) =&gt; {
        if(data.status == 28){
         editStatusObj.id = data.payload[0].id;
         editStatusObj.categories = data.payload[0].categories;
        }
      }
    )
  
    this.statusService.getCategoryInStatus(em).subscribe(
      (data) =&gt; {
        if(data.status == 23){
          statusCategoryObj.id = data.payload.id;
        }
      }
    );
  }
  </code></pre>
  
  <p>app.js(node side code)</p>
  
  <pre><code>app.post('/editStatusDetailsById',function(req,res){
    connection.query('SELECT id,categories from status WHERE id = ?',[req.body.id], function (error, results, fields) {
    if (error) throw error;
     res.send({
       'status':'28',
       'success': 'true',
       'payload': results,
       'message':'one language is edited'
     });
    });
  });
  </code></pre>
  
  <p>status.ts</p>
  
  <pre><code>export class Status {
     constructor(public id : number = null,
                 public languages : string = "") { }
  }
  </code></pre>
  
  <p>statuscategory.ts</p>
  
  <pre><code>export class StatusCategory {
  constructor(public id : number = null,
              public categorytitle : string = "",
             ){}
  </code></pre>