// Angular-Module einbinden
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from "@angular/common/http"; // neu ab 4.3
import { LocationStrategy, HashLocationStrategy } from '@angular/common';

// eigene Module
import { AppRoutingModule } from './app-routing.module';

// eigene Komponenten
import { AppComponent } from './app.component';
import { Flugliste } from './Flugliste/Flugliste';
import { Flugdetail } from './Flugdetail/Flugdetail';
import { FlugEdit } from './FlugEdit/FlugEdit';
import { Datenbindung } from './_Misc/datenbindung';
import { HrComponent } from './hr/hr.component';
import { CheatSheet } from './_CheatSheet/CheatSheet';

// eigene Pipes
import { ExponentialStrengthPipe } from "./Pipes/ExponentialStrengthPipe"
import { FixedLenNumberPipe } from "./Pipes/FixedLenNumber"
import { FlugStatusPipe } from "./Pipes/FlugStatusPipe"

// eigene Direktiven
import { BadgeDirective, SuccessDirective, HighlightDirective, WarningDirective, ButtonTypDirective } from "./Directives/Direktiven"

// eigene Services, die global registriert werden sollen
import { FlugdatenProxyTest } from "./Services/FlugdatenProxy.Test.js"
import { FlugdatenProxy } from "./Services/FlugdatenProxy.js"


@NgModule({
 imports: [BrowserModule, FormsModule, HttpModule,  HttpClientModule, AppRoutingModule,], // Module
 declarations: [AppComponent, Flugliste, Flugdetail, FlugEdit, Datenbindung, HrComponent, CheatSheet,
  ExponentialStrengthPipe, FixedLenNumberPipe, FlugStatusPipe, ButtonTypDirective, BadgeDirective, SuccessDirective, HighlightDirective, WarningDirective],   // Komponenten und Direktiven
 bootstrap: [AppComponent], // Startkompnente
 providers: [  // Dependency  Injection
  { provide: LocationStrategy, useClass: HashLocationStrategy },
  [FlugdatenProxy],
  // { provide: FlugdatenProxy, useClass: FlugdatenProxyTest } // Testdaten
  // oder: [FlugdatenProxy] // echte Daten
  // Langform: { provide: FlugdatenProxy, useClass: FlugdatenProxy },

 ]
})
export class AppModule { }