AlertController with line breaks and bullet points in it? Is it possible?

image

This is an alert from Airbnb.
Is it possible to have something similar with Ionic2?

  1. Bullet points and line breaks
  2. Block button
  3. Icon on top right
1 Like

Yes and no:

  showAlert() {
    let alert = this.alertCtrl.create({
      title: `A Great Title`,
      message: `
        <p> A great title is unique and descriptive! It should highlight the main attractions of your space.</p>
        <p>Example</p>
        <ul>
          <li> Charming Victoria in the Mission.</li>
          <li>Cosy 2BD with Parking Included</li>
          <li>Amazing View from a Mordern Loft</li>
        </ul>
      `,
      buttons: ['Okay']
    });
    alert.present();
  }

23 Likes

nice…works fine for me on ionic 5. Just replace title to header