From 125a0d4e8028f72c06b576d98a9c1bbeda9526ac Mon Sep 17 00:00:00 2001 From: Mohamed Saad Date: Tue, 14 Jul 2020 13:59:08 +0200 Subject: [PATCH] Update the alert component The dependencies needs to be updated from e,g: `ionic-angular` --> `@ionic/angular` and also the `AlertController` returns promise with the alert element created. --- content/_includes/fluid/component-docs/alert.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/_includes/fluid/component-docs/alert.html b/content/_includes/fluid/component-docs/alert.html index b239d6c24b..2ce3ca1531 100644 --- a/content/_includes/fluid/component-docs/alert.html +++ b/content/_includes/fluid/component-docs/alert.html @@ -37,19 +37,20 @@

Basic Usage

Basic Alerts are typically used to notify the user about new information (a change in the app, a new feature, etc), an urgent situation that requires acknowledgement, or as a confirmation to the user that an action was successful or not. ```typescript -import { AlertController } from 'ionic-angular'; +import { AlertController } from "@ionic/angular"; export class MyPage { constructor(public alertCtrl: AlertController) { } showAlert() { - const alert = this.alertCtrl.create({ + this.alertCtrl.create({ title: 'New Friend!', subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!', buttons: ['OK'] + }).then((alertElement) => { + alertElement.present(); }); - alert.present(); } } ```