ion alert checkbox

Solutions on MaxInterview for ion alert checkbox by the best coders in the world

showing results for - "ion alert checkbox"
Andrés
16 Jun 2018
1async presentAlertCheckbox() {
2    const alert = await this.alertController.create({
3      cssClass: 'my-custom-class',
4      header: 'Checkbox',
5      inputs: [
6        {
7          name: 'checkbox1',
8          type: 'checkbox',
9          label: 'Checkbox 1',
10          value: 'value1',
11          checked: true
12        },
13        {
14          name: 'checkbox2',
15          type: 'checkbox',
16          label: 'Checkbox 2',
17          value: 'value2'
18        },
19        {
20          name: 'checkbox3',
21          type: 'checkbox',
22          label: 'Checkbox 3',
23          value: 'value3'
24        }
25      ],
26      buttons: [
27        {
28          text: 'Cancel',
29          role: 'cancel',
30          cssClass: 'secondary',
31          handler: () => {
32            console.log('Confirm Cancel');
33          }
34        }, {
35          text: 'Ok',
36          handler: () => {
37            console.log('Confirm Ok');
38          }
39        }
40      ]
41    });
42    await alert.present();
43  }
44}