Remove unsed imports and file
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / app.module.ts
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2019 AT&T Intellectual Property
6  * Modifications Copyright (C) 2019 Nordix Foundation
7  * Modifications Copyright (C) 2020 Nordix Foundation
8  * %%
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ========================LICENSE_END===================================
21  */
22 import { BrowserModule } from '@angular/platform-browser';
23 import { MatDialogModule } from '@angular/material/dialog';
24 import { MatIconModule } from '@angular/material/icon';
25 import { MatSidenavModule } from '@angular/material/sidenav';
26 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
27 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
28 import { NgModule } from '@angular/core';
29 import { MDBBootstrapModule } from 'angular-bootstrap-md';
30 import { ToastrModule } from 'ngx-toastr';
31 import { ConfirmDialogComponent } from './ui/confirm-dialog/confirm-dialog.component';
32 import { ErrorDialogComponent } from './ui/error-dialog/error-dialog.component';
33 import { ErrorDialogService } from './services/ui/error-dialog.service';
34 import { FooterComponent } from './footer/footer.component';
35 import { MainComponent } from './main/main.component';
36 import { MaterialDesignFrameworkModule } from 'angular6-json-schema-form';
37 import { PolicyModule } from './policy/policy.module'
38 import { EiCoordinatorModule } from './ei-coordinator/ei-coordinator.module'
39 import { AppComponent } from './app.component';
40 import { AppRoutingModule } from './app-routing.module';
41 import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
42 import { UiService } from './services/ui/ui.service';
43 import { CookieService } from 'ngx-cookie-service';
44 import { HttpMockRequestInterceptor } from './interceptor.mock';
45 import { environment } from 'src/environments/environment';
46 import { HttpRequestInterceptor } from './interceptor';
47
48 export const isMock = environment.mock;
49
50 @NgModule({
51   declarations: [
52     AppComponent,
53     ConfirmDialogComponent,
54     ErrorDialogComponent,
55     FooterComponent,
56     MainComponent,
57     SidenavListComponent,
58   ],
59   imports: [
60     AppRoutingModule,
61     BrowserModule,
62     BrowserAnimationsModule,
63     HttpClientModule,
64     MatDialogModule,
65     MatIconModule,
66     MatSidenavModule,
67     MaterialDesignFrameworkModule,
68     MDBBootstrapModule.forRoot(),
69     PolicyModule,
70     EiCoordinatorModule,
71     ToastrModule.forRoot(),
72   ],
73   entryComponents: [
74     ConfirmDialogComponent,
75     ErrorDialogComponent,
76   ],
77   providers: [
78     CookieService,
79     ErrorDialogService,
80     UiService,
81     {
82       provide: HTTP_INTERCEPTORS,
83       useClass: isMock ? HttpMockRequestInterceptor : HttpRequestInterceptor,
84       multi: true
85       }
86   ],
87   bootstrap: [AppComponent]
88 })
89 export class AppModule { }