From b7b97ce4cc7ddf3bd7cbf778bdedbe5ac6fbfd8d Mon Sep 17 00:00:00 2001 From: William Martin Date: Wed, 31 Mar 2021 20:25:28 -0400 Subject: [PATCH] docs(modal): update angular usage for consistent modalController (#23127) --- core/src/components/modal/readme.md | 6 +++--- core/src/components/modal/usage/angular.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/components/modal/readme.md b/core/src/components/modal/readme.md index 1825c82c86..0c26b0ec9e 100644 --- a/core/src/components/modal/readme.md +++ b/core/src/components/modal/readme.md @@ -125,7 +125,7 @@ export class ModalPage { dismiss() { // using the injected ModalController this page // can "dismiss" itself and optionally pass back data - this.modalCtrl.dismiss({ + this.modalController.dismiss({ 'dismissed': true }); } @@ -200,14 +200,14 @@ In most scenarios, using the `ion-router-outlet` element as the `presentingEleme ```javascript import { ModalController } from '@ionic/angular'; -constructor(private modalCtrl: ModalController) {} +constructor(private modalController: ModalController) {} async presentModal() { const modal = await this.modalController.create({ component: ModalPage, cssClass: 'my-custom-class', swipeToClose: true, - presentingElement: await this.modalCtrl.getTop() // Get the top-most ion-modal + presentingElement: await this.modalController.getTop() // Get the top-most ion-modal }); return await modal.present(); } diff --git a/core/src/components/modal/usage/angular.md b/core/src/components/modal/usage/angular.md index d25845365d..d56f93527e 100644 --- a/core/src/components/modal/usage/angular.md +++ b/core/src/components/modal/usage/angular.md @@ -82,7 +82,7 @@ export class ModalPage { dismiss() { // using the injected ModalController this page // can "dismiss" itself and optionally pass back data - this.modalCtrl.dismiss({ + this.modalController.dismiss({ 'dismissed': true }); } @@ -157,14 +157,14 @@ In most scenarios, using the `ion-router-outlet` element as the `presentingEleme ```javascript import { ModalController } from '@ionic/angular'; -constructor(private modalCtrl: ModalController) {} +constructor(private modalController: ModalController) {} async presentModal() { const modal = await this.modalController.create({ component: ModalPage, cssClass: 'my-custom-class', swipeToClose: true, - presentingElement: await this.modalCtrl.getTop() // Get the top-most ion-modal + presentingElement: await this.modalController.getTop() // Get the top-most ion-modal }); return await modal.present(); }