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 { WilddogProvider } from "../providers/wilddog/wilddog" ; import { ThemeProvider } from "../providers/theme/theme" ; import * as wilddog from 'wilddog' ; @ Component ( { templateUrl : 'app.html' } ) export class MyApp { rootPage = 'TabsPage' ; theme : string ; constructor ( public platform , public statusBar , public splashScreen , public wilddogProvider , public themeProvider ) { platform . ready ( ) . then ( ( ) => { statusBar . styleDefault ( ) ; splashScreen . hide ( ) ; let config = { authDomain : this . wilddogProvider . appId + ".wilddog.com" } ; wilddog . initializeApp ( config ) ; this . themeProvider . getActiveTheme ( ) . subscribe ( theme => { theme ? this . theme = 'dark-theme' : this . theme = 'light-theme' ; } ) ; } ) ; } }