mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-14 04:05:23 +08:00
![Daniel Sogl](/assets/img/avatar_default.png)
* 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.
47 lines
1000 B
TypeScript
47 lines
1000 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|
|
|
|
|
/**
|
|
* @name Splash Screen
|
|
* @description This plugin displays and hides a splash screen during application launch. The methods below allows showing and hiding the splashscreen after the app has loaded.
|
|
* @usage
|
|
* ```typescript
|
|
* import { SplashScreen } from '@ionic-native/splash-screen';
|
|
*
|
|
* constructor(private splashScreen: SplashScreen) { }
|
|
*
|
|
* ...
|
|
*
|
|
* this.splashScreen.show();
|
|
*
|
|
* this.splashScreen.hide();
|
|
* ```
|
|
*/
|
|
@Plugin({
|
|
pluginName: 'SplashScreen',
|
|
plugin: 'cordova-plugin-splashscreen',
|
|
pluginRef: 'navigator.splashscreen',
|
|
repo: 'https://github.com/apache/cordova-plugin-splashscreen'
|
|
})
|
|
@Injectable()
|
|
export class SplashScreen extends IonicNativePlugin {
|
|
|
|
/**
|
|
* Shows the splashscreen
|
|
*/
|
|
@Cordova({
|
|
sync: true
|
|
})
|
|
show(): void { }
|
|
|
|
/**
|
|
* Hides the splashscreen
|
|
*/
|
|
@Cordova({
|
|
sync: true
|
|
})
|
|
hide(): void { }
|
|
|
|
}
|