From 3af23023eeae499c2314070336e0aadfb6d1af0c Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 3 Jul 2017 14:29:52 -0700 Subject: [PATCH] docs(): add example on how to use onChange() method (#1726) --- src/@ionic-native/plugins/screen-orientation/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/screen-orientation/index.ts b/src/@ionic-native/plugins/screen-orientation/index.ts index 5800d9727..1dd252677 100644 --- a/src/@ionic-native/plugins/screen-orientation/index.ts +++ b/src/@ionic-native/plugins/screen-orientation/index.ts @@ -26,8 +26,16 @@ import { Observable } from 'rxjs/Observable'; * * // allow user rotate * this.screenOrientation.unlock(); - * ``` * + * // detect orientation changes + * this.screenOrientation.onChange().subscribe( + * () => { + * console.log("Orientation Changed"); + * } + * ); + * + * ``` + * * @advanced * * Accepted orientation values: