Ion-checkbox with Ionic 2


Hi guys, was trying to return an array of ids in the ion-checkbox but no avail.

These are my current code.


this.surveyForm ={
  questions: formBuilder.array([])

let question ={
    question_id: [this.questions[i].id, Validators.required],
    answer_ids: formBuilder.array([


for (var j = 0; j < this.questions[i].answers.length; j++) {
  let answer = formBuilder.array(this.questions[i].answers)
  // this.surveyForm.controls['questions'].push()


<ion-list formArrayName="answer_ids">
  <div *ngFor="let choice of question.answers; let j = index">
      <ion-label style="white-space: normal;">{{ }}</ion-label>
      <ion-checkbox (ionChange)="onChange(, $event._checked)" value=""></ion-checkbox>

My current goal is to get that “answer_ids”: [81,82,83] for checked checkbox. Btw the questions are in nested form, probably there must be a way to segregate the answers control between question_id.