app.component.ts 787 Bytes
Newer Older
李晓兵's avatar
李晓兵 committed
1 2 3 4 5
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { JPush } from '@jiguang-ionic/jpush';
李晓兵's avatar
李晓兵 committed
6

李晓兵's avatar
李晓兵 committed
7 8 9 10 11 12 13 14 15 16 17 18 19
import { HomePage } from '../pages/home/home';
@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage:any = HomePage;

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, jpush: JPush) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();
李晓兵's avatar
李晓兵 committed
20

李晓兵's avatar
李晓兵 committed
21 22 23 24 25
      jpush.init();
      jpush.setDebugMode(true);
    });
  }
}