import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { IonicStorageModule } from '@ionic/storage';
import { Calendar } from '@ionic-native/calendar';
import { TabsModule } from '../pages/tabs/tabs.module';
import { LoginModule } from '../pages/login/login.module';
import { HttpModule, JsonpModule } from '@angular/http';
import { AppService } from '../service/appHttpService';
import { AppUpdateService } from '../service/appUpdateService';
import { ActivityStatisticService } from '../service/activityStatisticService';
import { AppVersion } from '@ionic-native/app-version';
import { FileOpener } from '@ionic-native/file-opener';
import { FileTransfer, FileTransferObject } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file';
import { Keyboard } from '@ionic-native/keyboard';
import { Badge } from "@ionic-native/badge";

@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp,{tabsHideOnSubPages: 'true'}),
    IonicStorageModule.forRoot(),
    TabsModule,
    LoginModule,
    HttpModule,
    JsonpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    StatusBar,
    SplashScreen,
    AppService,
    AppUpdateService,
    AppVersion,
    FileOpener,
    FileTransfer,
    FileTransferObject,
    File,
    Keyboard,
    Calendar,
    Badge,
    ActivityStatisticService,
    { provide: ErrorHandler, useClass: IonicErrorHandler }
  ]
})
export class AppModule { }
