From d03ff962e36f4411e245c50adf6bd4c37b3e5636 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Sun, 17 Jul 2016 02:35:31 -0400 Subject: [PATCH] docs(nativestorage): add usage --- src/plugins/nativestorage.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/plugins/nativestorage.ts b/src/plugins/nativestorage.ts index 46d513b7d..3a19ef6f8 100644 --- a/src/plugins/nativestorage.ts +++ b/src/plugins/nativestorage.ts @@ -1,6 +1,24 @@ import {Plugin, Cordova} from './plugin'; /** * @name Native Storage + * @description + * + * @usage + * ```typescript + * import {NativeStorage} from 'ionic-native'; + * + * NativeStorage.setItem('myitem', {property: 'value', anotherProperty: 'anotherValue'}) + * .then( + * () => console.log('Stored item!'), + * error => console.error('Error storing item', error) + * ); + * + * NativeStorage.getItem('myitem') + * .then( + * data => console.log(data), + * error => console.error(error) + * ); + * ``` */ @Plugin({ plugin: 'cordova-plugin-nativestorage',