These are chat archives for angular/angular-2-ionic-2

30th
Nov 2016
ikhsanputra07
@ikhsanputra07
Nov 30 2016 03:39
hey everyone, i have problem with autoescape in my text document. does anyone know how to remove autoescape in ionic 2? thanks
PraveenIglesias
@PraveenIglesias
Nov 30 2016 14:29
can anyone help me on this? How can we add a dependency to package.json during run-time? It may sound weird
I meant to add dependencies (like 3rd party component library)
Pythic
@Pythic
Nov 30 2016 16:16

Hey guys, I run into a problem using ion-checkbox and FormGroup FromArray etc
Component code :

    this.addNewQuestionSetForm = this._formBuilder.group({
      selectedQuestionKeys: this._formBuilder.array([]),
    });

    this.addNewQuestionSetForm.valueChanges.subscribe(res => {
      console.log(JSON.stringify(res));
    });

Template code:

      <form autocomplete="off" novalidate [formGroup]="addNewQuestionSetForm">
      <ion-row *ngFor="let question of filteredQuestions">
        <ion-col width-10>
          <ion-checkbox formArrayName="selectedQuestionKeys" id="{{question.$key}}"></ion-checkbox>
       </ion-col>
        <ion-col width-50>
            {{question.text}}
        </ion-col>
        <ion-col width-20>
            0
        </ion-col>
      </ion-row>
      </form>

I do not see any changes in the valueChanges Observable .. What is the correct way to combine ion-checkboxes and FormGroup?

Thanks in advance