Adding aliases for imports
[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 {MatListModule} from '@angular/material/list';
26 import { MatSidenavModule } from '@angular/material/sidenav';
27 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
28 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
29 import { NgModule } from '@angular/core';
30 import { MDBBootstrapModule } from 'angular-bootstrap-md';
31 import { ToastrModule } from 'ngx-toastr';
32 import { ConfirmDialogComponent } from '@ui/confirm-dialog/confirm-dialog.component';
33 import { ErrorDialogComponent } from '@ui/error-dialog/error-dialog.component';
34 import { ErrorDialogService } from '@services/ui/error-dialog.service';
35 import { FooterComponent } from './footer/footer.component';
36 import { MainComponent } from './main/main.component';
37 import { MaterialDesignFrameworkModule } from 'angular6-json-schema-form';
38 import { PolicyModule } from '@policy/policy.module'
39 import { EiCoordinatorModule } from '@ei-coordinator/ei-coordinator.module'
40 import { AppComponent } from './app.component';
41 import { AppRoutingModule } from './app-routing.module';
42 import { SidenavListComponent } from '@navigation/sidenav-list/sidenav-list.component';
43 import { UiService } from '@services/ui/ui.service';
44 import { CookieService } from 'ngx-cookie-service';
45 import { HttpMockRequestInterceptor } from './interceptor.mock';
46 import { environment } from 'environments/environment';
47 import { HttpRequestInterceptor } from './interceptor';
48 import { MatSlideToggleModule } from '@angular/material/slide-toggle';
49
50 export const isMock = environment.mock;
51
52 @NgModule({
53   declarations: [
54     AppComponent,
55     ConfirmDialogComponent,
56     ErrorDialogComponent,
57     FooterComponent,
58     MainComponent,
59     SidenavListComponent,
60   ],
61   imports: [
62     AppRoutingModule,
63     BrowserModule,
64     BrowserAnimationsModule,
65     HttpClientModule,
66     MatDialogModule,
67     MatIconModule,
68     MatListModule,
69     MatSidenavModule,
70     MatSlideToggleModule,
71     MaterialDesignFrameworkModule,
72     MDBBootstrapModule.forRoot(),
73     PolicyModule,
74     EiCoordinatorModule,
75     ToastrModule.forRoot(),
76   ],
77   entryComponents: [
78     ConfirmDialogComponent,
79     ErrorDialogComponent,
80   ],
81   providers: [
82     CookieService,
83     ErrorDialogService,
84     UiService,
85     {
86       provide: HTTP_INTERCEPTORS,
87       useClass: isMock ? HttpMockRequestInterceptor : HttpRequestInterceptor,
88       multi: true
89       }
90   ],
91   bootstrap: [AppComponent]
92 })
93 export class AppModule { }