app.module.ts 1.62 KB
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1
import {NgModule,Pipe,PipeTransform} from '@angular/core';
2 3 4 5 6 7
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {FormsModule} from '@angular/forms';
import {JsonPipe} from '@angular/common';
import {HttpModule} from '@angular/http';
import {HttpClientModule, HttpClientXsrfModule} from '@angular/common/http';
Lukas Burgey's avatar
Lukas Burgey committed
8

9 10 11
// Other libs
import {StompRService} from '@stomp/ng2-stompjs';
import {CookieService} from 'ngx-cookie-service';
Lukas Burgey's avatar
Lukas Burgey committed
12

13
// Our stuff
Lukas Burgey's avatar
Lukas Burgey committed
14 15
//
// services
16 17
import {UserService} from './user.service';
import {SnackBarService} from './snackbar.service';
Lukas Burgey's avatar
Lukas Burgey committed
18

Lukas Burgey's avatar
Lukas Burgey committed
19 20 21 22 23 24
// imports
import {DialoguesModule} from './dialogues/dialogues.module';
import {MaterialModule} from './material/material.module';
import {SharedModule} from './shared/shared.module';

// declarations
25 26 27 28
import {AppComponent} from './app.component';
import {MgmtComponent} from './mgmt/mgmt.component';
import {LoginComponent} from './login/login.component';
import {ServiceComponent} from './service/service.component';
Lukas Burgey's avatar
Lukas Burgey committed
29 30 31 32 33 34


@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
Lukas Burgey's avatar
Lukas Burgey committed
35
    FormsModule,
Lukas Burgey's avatar
Lukas Burgey committed
36
    HttpModule,
Lukas Burgey's avatar
Lukas Burgey committed
37 38 39 40 41
    HttpClientModule,
    HttpClientXsrfModule.withOptions({
      cookieName: 'csrftoken',
      headerName: 'HTTP_X_CSRFTOKEN',
    }),
Lukas Burgey's avatar
Lukas Burgey committed
42 43 44 45 46 47 48 49 50
    DialoguesModule,
    MaterialModule,
    SharedModule,
  ],
  declarations: [
    AppComponent,
    MgmtComponent,
    LoginComponent,
    ServiceComponent,
Lukas Burgey's avatar
Lukas Burgey committed
51 52
  ],
  providers: [
Lukas Burgey's avatar
Lukas Burgey committed
53 54 55
    CookieService,
    UserService,
    SnackBarService,
56
    StompRService,
Lukas Burgey's avatar
Lukas Burgey committed
57
    JsonPipe,
Lukas Burgey's avatar
Lukas Burgey committed
58 59
  ],
  bootstrap: [AppComponent],
Lukas Burgey's avatar
Lukas Burgey committed
60 61
})
export class AppModule {
Lukas Burgey's avatar
Lukas Burgey committed
62
  constructor() {
Lukas Burgey's avatar
Lukas Burgey committed
63 64 65
  }
}