mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
docs(plugin): add docs
This commit is contained in:
parent
8855359527
commit
e053c945ee
@ -47,7 +47,20 @@ export interface CompassOptions {
|
||||
* ````
|
||||
*
|
||||
* @usage
|
||||
* ```js
|
||||
* ```ts
|
||||
* // Get the device current compass heading
|
||||
* DeviceOrientation.getCurrentHeading().then(
|
||||
* data => console.log(data),
|
||||
* error => console.log(error)
|
||||
* );
|
||||
*
|
||||
* // Watch the device compass heading change
|
||||
* var subscription = DeviceOrientation.watchHeading().subscribe(
|
||||
* data => console.log(data)
|
||||
* );
|
||||
*
|
||||
* // Stop watching heading change
|
||||
* subscription.unsubscribe();
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
|
Loading…
Reference in New Issue
Block a user