import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { HttpClientModule } from '@angular/common/http';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { NewProfilePage } from '../pages/registerUser/registerUser';
import { TeacherRegistrationPage } from '../pages/registerTeacher/registerTeacher';
import { SearchPage } from '../pages/search/search';


import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { ConnectionProvider } from '../providers/connection/connection';
import { DistrictProvider } from '../providers/connection/district';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    ListPage,
    NewProfilePage,
    TeacherRegistrationPage,
    SearchPage,
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HttpClientModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    ListPage, 
    NewProfilePage,
    TeacherRegistrationPage,
    SearchPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    ConnectionProvider,
    DistrictProvider, 
    {provide: ErrorHandler, useClass: IonicErrorHandler}
    
  ]
})
export class AppModule {}
