Daniel Sogl c6f9fa356f style(): unify docs and spacing (#1448)
* 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.
2017-04-30 14:36:22 -04:00

52 lines
1.2 KiB
TypeScript

import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @beta
* @name Backlight
* @description
* This plugin adds turning on/off the device backlight.
*
* @usage
* ```typescript
* import { Backlight } from '@ionic-native/backlight';
*
* constructor(private backlight: Backlight) { }
*
* ...
*
* // Turn backlight on
* this.backlight.on().then(() => console.log('backlight on'));
*
* // Turn backlight off
* this.backlight.off().then(() => console.log('backlight off'));
*
* ```
*/
@Plugin({
pluginName: 'Backlight',
plugin: 'cordova-plugin-backlight',
pluginRef: 'cordova.plugins.Backlight',
repo: 'https://github.com/mebibou/cordova-plugin-backlight',
platforms: ['Android']
})
@Injectable()
export class Backlight extends IonicNativePlugin {
/**
* This function turns backlight on
* @return {Promise<any>} Returns a promise that resolves when the backlight is on
*/
@Cordova()
on(): Promise<any> { return; }
/**
* This function turns backlight off
* @return {Promise<any>} Returns a promise that resolves when the backlight is off
*/
@Cordova()
off(): Promise<any> { return; }
}