mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
refactor(phonegap-local-notification): fix class name to match plugin name
BREAKING CHANGE: PhonegapLocalNotifications class has been renamed to PhonegapLocalNotification
This commit is contained in:
parent
c3f9fb4a23
commit
c6a76c26e0
@ -1,14 +1,14 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability } from '@ionic-native/core';
|
import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability } from '@ionic-native/core';
|
||||||
|
|
||||||
declare var Notification: any;
|
declare const Notification: any;
|
||||||
|
|
||||||
export class PLNObject {
|
export class PLNObject {
|
||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(title: string, options: LocalNotificationOptions) {
|
constructor(title: string, options: LocalNotificationOptions) {
|
||||||
if (checkAvailability(PhonegapLocalNotifications.pluginRef, null, PhonegapLocalNotifications.pluginName) === true) {
|
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
|
||||||
this._objectInstance = new Notification(title, options);
|
this._objectInstance = new Notification(title, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ export interface LocalNotificationOptions {
|
|||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { PhonegapLocalNotifications } from '@ionic-native/phonegap-local-notifications';
|
* import { PhonegapLocalNotification } from '@ionic-native/phonegap-local-notification';
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* constructor(private localNotification: PhonegapLocalNotifications) { }
|
* constructor(private localNotification: PhonegapLocalNotifications) { }
|
||||||
@ -87,10 +87,10 @@ export interface LocalNotificationOptions {
|
|||||||
plugin: 'phonegap-local-notifications',
|
plugin: 'phonegap-local-notifications',
|
||||||
pluginRef: 'Notification',
|
pluginRef: 'Notification',
|
||||||
repo: 'https://github.com/phonegap/phonegap-plugin-local-notification',
|
repo: 'https://github.com/phonegap/phonegap-plugin-local-notification',
|
||||||
platforms: ['Android', , 'Browser', 'iOS', 'Windows']
|
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PhonegapLocalNotifications extends IonicNativePlugin {
|
export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A global object that lets you interact with the Notification API.
|
* A global object that lets you interact with the Notification API.
|
||||||
|
Loading…
Reference in New Issue
Block a user