Skip to content

Commit 25a4341

Browse files
committed
docs(loading): add some docs on the onDismiss function
1 parent d6589e1 commit 25a4341

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ionic/components/loading/loading.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ import {ViewController} from '../nav/view-controller';
3636
* the `duration` of the loading options. By default the loading indicator
3737
* will show even during page changes, but this can be disabled by setting
3838
* `dismissOnPageChange` to `true`. To dismiss the loading indicator after
39-
* creation, call the `dismiss()` method on the Loading instance.
39+
* creation, call the `dismiss()` method on the Loading instance. The
40+
* `onDismiss` function can be called to perform an action after the loading
41+
* indicator is dismissed.
4042
*
4143
* ### Limitations
4244
* The element is styled to appear on top of other content by setting its
@@ -71,6 +73,10 @@ import {ViewController} from '../nav/view-controller';
7173
* duration: 5000
7274
* });
7375
*
76+
* loading.onDismiss(() => {
77+
* console.log('Dismissed loading');
78+
* });
79+
*
7480
* this.nav.present(loading);
7581
* }
7682
*

ionic/components/loading/test/basic/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ class E2EPage {
1313
duration: 1000
1414
});
1515

16+
loading.onDismiss(() => {
17+
console.log('Dismissed loading');
18+
});
19+
1620
this.nav.present(loading);
1721
}
1822

0 commit comments

Comments
 (0)