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";
import {ContactModalPage} from "../pages/contact/contact-modal/contact-modal";

@NgModule({
  declarations: [
    MyApp,
      ContactModalPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp,{
        tabsHideOnSubPages: 'true',
        backButtonText:'',   //返回按钮显示中文
        statusbarPadding:false,
        iconModel:'ios',   //icon显示图标为IOS版
        mode:'ios',   //安卓和IOS的样式以IOS样式为准
        modalEnter:'modal-slide-in',
        modalLeave:'modal-slide-out'
    }),
    IonicStorageModule.forRoot(),
    TabsModule,
    LoginModule,
    HttpModule,
    JsonpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
      ContactModalPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    AppService,
    AppUpdateService,
    AppVersion,
    FileOpener,
    FileTransfer,
    FileTransferObject,
    File,
    Keyboard,
    Calendar,
    Badge,
    ActivityStatisticService,
    { provide: ErrorHandler, useClass: IonicErrorHandler }
  ]
})
export class AppModule { }
