From 6ccf3a66bbdc9d4be624fd302fb737d65c3aa6d7 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 29 Mar 2017 18:56:15 -0400 Subject: [PATCH] docs(native-page-transitions): improve docs closes #1294 --- .../plugins/native-page-transitions/index.ts | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/@ionic-native/plugins/native-page-transitions/index.ts b/src/@ionic-native/plugins/native-page-transitions/index.ts index 6b123df95..9721eb5d1 100644 --- a/src/@ionic-native/plugins/native-page-transitions/index.ts +++ b/src/@ionic-native/plugins/native-page-transitions/index.ts @@ -29,21 +29,35 @@ export interface NativeTransitionOptions { * * ... * - * let options: NativeTransitionOptions = { - * direction: 'up', - * duration: 500, - * slowdownfactor: 3, - * slidePixels: 20, - * iosdelay: 100, - * androiddelay: 150, - * winphonedelay: 250, - * fixedPixelsTop: 0, - * fixedPixelsBottom: 60 - * }; * - * this.nativePageTransitions.slide(options) - * .then(onSuccess) - * .catch(onError); + * // example of adding a transition when a page/modal closes + * ionViewWillLeave() { + * + * let options: NativeTransitionOptions = { + * direction: 'up', + * duration: 500, + * slowdownfactor: 3, + * slidePixels: 20, + * iosdelay: 100, + * androiddelay: 150, + * fixedPixelsTop: 0, + * fixedPixelsBottom: 60 + * }; + * + * this.nativePageTransitions.slide(options) + * .then(onSuccess) + * .catch(onError); + * + * } + * + * + * // example of adding a transition when pushing a new page + * openPage(page: any) { + * + * this.nativePageTransitions.slide(options); + * this.navCtrl.push(page); + * + * } * * ``` */