docs(nativestorage): add usage
This commit is contained in:
parent
af5d4ad87f
commit
d03ff962e3
@ -1,6 +1,24 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova} from './plugin';
|
||||||
/**
|
/**
|
||||||
* @name Native Storage
|
* @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({
|
||||||
plugin: 'cordova-plugin-nativestorage',
|
plugin: 'cordova-plugin-nativestorage',
|
||||||
|
Loading…
Reference in New Issue
Block a user