mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
feat(): add IonicNativePlugin base class (#1425)
* add base class * properties are static * some fixes * tslint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface IPedometerData {
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { Pedometer } from 'ionic-native';
|
||||
* import { Pedometer } from '@ionic-native/pedometer';
|
||||
*
|
||||
* Pedometer.isDistanceAvailable()
|
||||
* .then((available: boolean) => console.log(available))
|
||||
@@ -42,7 +42,7 @@ export interface IPedometerData {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Pedometer {
|
||||
export class Pedometer extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Checks if step counting is available. Only works on iOS.
|
||||
|
||||
Reference in New Issue
Block a user