app.component.ts 650 B

123456789101112131415161718192021222324252627
  1. import { Component } from '@angular/core';
  2. import { Platform } from '@ionic/angular';
  3. import { SplashScreen } from '@ionic-native/splash-screen/ngx';
  4. import { StatusBar } from '@ionic-native/status-bar/ngx';
  5. @Component({
  6. selector: 'app-root',
  7. templateUrl: 'app.component.html',
  8. styleUrls: ['app.component.scss']
  9. })
  10. export class AppComponent {
  11. constructor(
  12. private platform: Platform,
  13. private splashScreen: SplashScreen,
  14. private statusBar: StatusBar
  15. ) {
  16. this.initializeApp();
  17. }
  18. initializeApp() {
  19. this.platform.ready().then(() => {
  20. this.statusBar.styleDefault();
  21. this.splashScreen.hide();
  22. });
  23. }
  24. }