mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
refactor: optimize plugins for angular treeshaking
BREAKING CHANGE: You can remove the plugin import from the app.module.ts because of the changed Inject decorator
This commit is contained in:
@@ -74,7 +74,9 @@ export interface NdefTag {
|
||||
/**
|
||||
* @{ NFC } class methods
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NFC extends IonicNativePlugin {
|
||||
FLAG_READER = {
|
||||
NFC_A: 0,
|
||||
@@ -311,7 +313,9 @@ export class NFC extends IonicNativePlugin {
|
||||
* Do not pass bytes as parameters for these methods, conversion is built in.
|
||||
* For usage with nfc.write() and nfc.share()
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class Ndef extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
TNF_EMPTY: number;
|
||||
@@ -423,7 +427,9 @@ export class Ndef extends IonicNativePlugin {
|
||||
plugin: 'phonegap-nfc',
|
||||
pluginRef: 'util'
|
||||
})
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NfcUtil extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
toHex(i: number): string {
|
||||
|
||||
Reference in New Issue
Block a user