如何使用离子2/3从多个复选框中获取数据

时间:2018-01-31 06:32:05

标签: angular typescript ionic2 ionic3

嗨我是离子2的新手在这里我面临的问题与复选框在这里我做什么我想从复选框中获取值后,我在这里检查我使用被动方法所以我想得到使用formControlname

的数据
<ion-list *ngFor="let item of collection">
            <ion-list-header>
              Skills
            </ion-list-header>

            <ion-item >
              <ion-label>{{item.label}}</ion-label>
              <ion-checkbox ></ion-checkbox>
            </ion-item>

          </ion-list>






this.collection=[
                {
                    "label": "English",
                    "checked": false
                },
                {
                    "label": "Computer",
                    "checked": false
                },
                {
                    "label": "Sales",
                    "checked": false
                },
                {
                    "label": "Driving",
                    "checked": false
                },
                 ]  

0 个答案:

没有答案