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:
@@ -47,7 +47,9 @@ export interface BatteryStatusResponse {
|
||||
repo: 'https://github.com/apache/cordova-plugin-battery-status',
|
||||
platforms: ['iOS', 'Android', 'Windows', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BatteryStatus extends IonicNativePlugin {
|
||||
/**
|
||||
* Watch the change in battery level
|
||||
|
||||
Reference in New Issue
Block a user