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

import { MatButtonModule } from '@angular/material';
Lukas Burgey's avatar
Lukas Burgey committed
11 12 13 14 15 16 17 18 19
import { MatToolbarModule } from '@angular/material';
import { MatTableModule } from '@angular/material/table';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatIconModule } from '@angular/material/icon';
import { MatDialogModule } from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import {MatInputModule} from '@angular/material/input';
20
import {MatCheckboxModule} from '@angular/material/checkbox';
21
import {MatTooltipModule} from '@angular/material/tooltip';
22

Lukas Burgey's avatar
Lukas Burgey committed
23 24

import { CookieService } from 'ngx-cookie-service';
Lukas Burgey's avatar
Lukas Burgey committed
25

Lukas Burgey's avatar
Lukas Burgey committed
26 27
import { UserService } from './user.service';
import { SnackBarService } from './snackbar.service';
28
import { DialogService } from './dialog.service';
Lukas Burgey's avatar
Lukas Burgey committed
29 30 31 32

import { AppComponent } from './app.component';
import { MgmtComponent } from './mgmt/mgmt.component';
import { LoginComponent } from './login/login.component';
Lukas Burgey's avatar
Lukas Burgey committed
33 34 35
import { ProfileComponent } from './profile/profile.component';
import { ServiceComponent } from './service/service.component';
import { SshKeysComponent } from './ssh-keys/ssh-keys.component';
Lukas Burgey's avatar
Lukas Burgey committed
36
import { AccountComponent } from './account/account.component';
Lukas Burgey's avatar
Lukas Burgey committed
37

Lukas Burgey's avatar
Lukas Burgey committed
38
/*
Lukas Burgey's avatar
Lukas Burgey committed
39 40 41
const routes = [
  {
    path: '',
Lukas Burgey's avatar
Lukas Burgey committed
42
    component: MgmtComponent,
Lukas Burgey's avatar
Lukas Burgey committed
43 44
  },
  {
Lukas Burgey's avatar
Lukas Burgey committed
45 46
    path: '*',
    redirectTo: '/',
Lukas Burgey's avatar
Lukas Burgey committed
47 48
  },
];
Lukas Burgey's avatar
Lukas Burgey committed
49
 */
Lukas Burgey's avatar
Lukas Burgey committed
50 51 52 53 54 55

@NgModule({
  declarations: [
    AppComponent,
    MgmtComponent,
    LoginComponent,
Lukas Burgey's avatar
Lukas Burgey committed
56 57 58
    ProfileComponent,
    ServiceComponent,
    SshKeysComponent,
Lukas Burgey's avatar
Lukas Burgey committed
59
    AccountComponent,
Lukas Burgey's avatar
Lukas Burgey committed
60 61 62 63
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
Lukas Burgey's avatar
Lukas Burgey committed
64
    FormsModule,
Lukas Burgey's avatar
Lukas Burgey committed
65
    HttpModule,
Lukas Burgey's avatar
Lukas Burgey committed
66 67 68 69 70
    HttpClientModule,
    HttpClientXsrfModule.withOptions({
      cookieName: 'csrftoken',
      headerName: 'HTTP_X_CSRFTOKEN',
    }),
Lukas Burgey's avatar
Lukas Burgey committed
71
    /*
Lukas Burgey's avatar
Lukas Burgey committed
72 73 74
    RouterModule.forRoot(
      routes,
    ),
Lukas Burgey's avatar
Lukas Burgey committed
75
     */
Lukas Burgey's avatar
Lukas Burgey committed
76
    MatButtonModule,
Lukas Burgey's avatar
Lukas Burgey committed
77 78 79 80 81 82 83 84 85
    MatToolbarModule,
    MatTableModule,
    MatSnackBarModule,
    MatExpansionModule,
    MatIconModule,
    MatDialogModule,
    MatFormFieldModule,
    MatSelectModule,
    MatInputModule,
86
    MatCheckboxModule,
87
    MatTooltipModule,
Lukas Burgey's avatar
Lukas Burgey committed
88 89
  ],
  providers: [
Lukas Burgey's avatar
Lukas Burgey committed
90 91 92
    CookieService,
    UserService,
    SnackBarService,
93
    DialogService,
Lukas Burgey's avatar
Lukas Burgey committed
94 95 96 97 98 99
    JsonPipe,
  ],
  bootstrap: [AppComponent],
  entryComponents: [
    ProfileComponent,
    SshKeysComponent,
Lukas Burgey's avatar
Lukas Burgey committed
100
    AccountComponent,
Lukas Burgey's avatar
Lukas Burgey committed
101 102 103
  ],
})
export class AppModule {
Lukas Burgey's avatar
Lukas Burgey committed
104
  constructor() {
Lukas Burgey's avatar
Lukas Burgey committed
105 106 107
  }
}