Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ionic4 Alert Dynamic Checkboxes

$
0
0

@RaulGM wrote:

Hi, everyone!

I am migrating from Ionic V3 to V4. I used to have an alert with dynamic checkboxes. The code used to be like this:

let alert = this.alertCtrl.create ();
alert.setTitle (this.alertTitle);
for (var i = 0; i < this.myArray.length; i ++) {
  alert.addInput ({
    type: 'checkbox',
    label: alert,
    value: '' + i,
    checked: false
  });
}

alert.addButton 'cancel');
alert.addButton ({
  text: 'ok',
  handler: data => {
    console.log ('hi')
  }
});
alert.present ();

But now I can initialize let alert = this.alertCtrl.create (); but I can’t access any method like alert.addInput ().

Is there any other way of doing this?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>