feat(app-minimize): add AppMinimize plugin (#1501)

* typo(barcode-scanner): fixe circle lint error

* typo(docs):  Unified the documentations

In some plugins the typescript markup was missing.
I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same.

* Added AppMinimize plugin

* promisse

* usage
This commit is contained in:
Daniel Sogl 2017-05-09 23:35:13 +02:00 committed by Ibby Hadeed
parent 14f38a0e28
commit d25b2f16a9

View File

@ -0,0 +1,42 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name App Minimize
* @description
* AppMinimize is a plugin to minimize the application on android devices
*
* @usage
* ```typescript
* import { AppMinimize } from '@ionic-native/app-minimize';
*
*
* constructor(private appMinimize: AppMinimize) { }
*
* ...
*
* this.plugin.minimize().then(
* success => console.log('Closed'),
* err => console.log('Something went wrong')
* );
*
* ```
*/
@Plugin({
pluginName: 'AppMinimize',
plugin: 'https://github.com/tomloprod/cordova-plugin-appminimize.git',
pluginRef: 'cordova.plugins.appMinimize',
repo: 'https://github.com/tomloprod/cordova-plugin-appminimize',
platforms: ['Android']
})
@Injectable()
export class AppMinimize extends IonicNativePlugin {
/**
* Minimizes the application
* @return {Promise<any>}
*/
@Cordova()
minimize(): Promise<any> { return; }
}