From 25a43410adf6138e0d4487bcca7e3d17a40020bc Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 21 Apr 2016 13:46:42 -0400 Subject: [PATCH] docs(loading): add some docs on the onDismiss function --- ionic/components/loading/loading.ts | 8 +++++++- ionic/components/loading/test/basic/index.ts | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ionic/components/loading/loading.ts b/ionic/components/loading/loading.ts index 4f200c7a53..727403bb17 100644 --- a/ionic/components/loading/loading.ts +++ b/ionic/components/loading/loading.ts @@ -36,7 +36,9 @@ import {ViewController} from '../nav/view-controller'; * the `duration` of the loading options. By default the loading indicator * will show even during page changes, but this can be disabled by setting * `dismissOnPageChange` to `true`. To dismiss the loading indicator after - * creation, call the `dismiss()` method on the Loading instance. + * creation, call the `dismiss()` method on the Loading instance. The + * `onDismiss` function can be called to perform an action after the loading + * indicator is dismissed. * * ### Limitations * The element is styled to appear on top of other content by setting its @@ -71,6 +73,10 @@ import {ViewController} from '../nav/view-controller'; * duration: 5000 * }); * + * loading.onDismiss(() => { + * console.log('Dismissed loading'); + * }); + * * this.nav.present(loading); * } * diff --git a/ionic/components/loading/test/basic/index.ts b/ionic/components/loading/test/basic/index.ts index baf8063c09..d3d46c3c5d 100644 --- a/ionic/components/loading/test/basic/index.ts +++ b/ionic/components/loading/test/basic/index.ts @@ -13,6 +13,10 @@ class E2EPage { duration: 1000 }); + loading.onDismiss(() => { + console.log('Dismissed loading'); + }); + this.nav.present(loading); }