From a04197baef07f41cf2d8273fd3fd34c7d7236af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20de=20la=20Rosa?= Date: Fri, 11 May 2018 14:43:51 +0200 Subject: [PATCH] docs(toast): fix angular usage The create method returns a promise. Other examples deal with this using async-await, so I did the same thing in this instance. --- core/src/components/toast/usage/angular.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/components/toast/usage/angular.md b/core/src/components/toast/usage/angular.md index ecdae713ab..df4e7879dc 100644 --- a/core/src/components/toast/usage/angular.md +++ b/core/src/components/toast/usage/angular.md @@ -11,16 +11,16 @@ export class ToastExample { constructor(public toastController: ToastController) {} - presentToast() { - const toast = this.toastController.create({ + async presentToast() { + const toast = await this.toastController.create({ message: 'Your settings have been saved.', duration: 2000 }); toast.present(); } - presentToastWithOptions() { - const toast = this.toastController.create({ + async presentToastWithOptions() { + const toast = await this.toastController.create({ message: 'Click to Close', showCloseButton: true, position: 'top',