1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Pick the all checked items from the component - multi-select checkbox

Discussão em 'Angular' iniciado por Sampath, Novembro 8, 2024 às 10:32.

  1. Sampath

    Sampath Guest

    I have a multi-select checkbox list as shown below. Can you tell me how to pick the all checked items from the component (.ts)?

    .html:

    <ion-list>
    <ion-item *ngFor="let i of inputs">
    <ion-label>{{i.display}}</ion-label>
    <ion-checkbox name="{{i.label}}" [(ngModel)]="i.checked"></ion-checkbox>
    </ion-item>
    </ion-list>


    .ts:

    this.inputs=[
    {
    "encode": "1",
    "display": "en falls asleep without a caregiver in the room",
    "label": "uiFallsAsleepUnassistedBedTime",
    "checked": false
    },
    {
    "encode": "2",
    "display": "During breastfeeding",
    "label": "uiBreastFeedBedTime",
    "checked": false
    },
    {
    "encode": "3",
    "display": "Being rocked or held (in arms or baby sling/carrier)",
    "label": "uiSlingBedTime",
    "checked": false
    },
    {
    "encode": "4",
    "display": "In motion (stroller, car, etc.)",
    "label": "uiInMotionBedTime",
    "checked": false
    },

    ]

    Continue reading...

Compartilhe esta Página