|
1
|
|
|
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; |
|
2
|
|
|
import { BrowserModule } from "@angular/platform-browser"; |
|
3
|
|
|
import { HttpClient, HttpClientModule } from "@angular/common/http"; |
|
4
|
|
|
|
|
5
|
|
|
import { AppRoutingModule } from "./app-routing.module"; |
|
6
|
|
|
import { AppComponent } from "./app.component"; |
|
7
|
|
|
import { HomeComponent } from "./components/home/home.component"; |
|
8
|
|
|
import { DeleteProductModalComponent } from "./components/delete-product-modal/delete-product-modal.component"; |
|
9
|
|
|
import { AddOrEditProductModalComponent } from "./components/add-or-edit-product-modal/add-or-edit-product-modal.component"; |
|
10
|
|
|
import { ClarityModule } from "@clr/angular"; |
|
11
|
|
|
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; |
|
12
|
|
|
import { ShowProductComponent } from "./components/show-product/show-product.component"; |
|
13
|
|
|
import { ReactiveFormsModule } from "@angular/forms"; |
|
14
|
|
|
|
|
15
|
|
|
import {TranslateLoader, TranslateModule} from '@ngx-translate/core'; |
|
16
|
|
|
import {TranslateHttpLoader} from '@ngx-translate/http-loader'; |
|
17
|
|
|
|
|
18
|
|
|
import { cloudIcon, ClarityIcons } from "@cds/core/icon"; |
|
19
|
|
|
import "@cds/core/icon/register.js"; |
|
20
|
|
|
import "@cds/core/accordion/register.js"; |
|
21
|
|
|
import "@cds/core/alert/register.js"; |
|
22
|
|
|
import "@cds/core/button/register.js"; |
|
23
|
|
|
import "@cds/core/checkbox/register.js"; |
|
24
|
|
|
import "@cds/core/datalist/register.js"; |
|
25
|
|
|
import "@cds/core/file/register.js"; |
|
26
|
|
|
import "@cds/core/forms/register.js"; |
|
27
|
|
|
import "@cds/core/input/register.js"; |
|
28
|
|
|
import "@cds/core/password/register.js"; |
|
29
|
|
|
import "@cds/core/radio/register.js"; |
|
30
|
|
|
import "@cds/core/range/register.js"; |
|
31
|
|
|
import "@cds/core/search/register.js"; |
|
32
|
|
|
import "@cds/core/select/register.js"; |
|
33
|
|
|
import "@cds/core/textarea/register.js"; |
|
34
|
|
|
import "@cds/core/time/register.js"; |
|
35
|
|
|
import "@cds/core/toggle/register.js"; |
|
36
|
|
|
@NgModule({ |
|
37
|
|
|
declarations: [ |
|
38
|
|
|
AppComponent, |
|
39
|
|
|
HomeComponent, |
|
40
|
|
|
DeleteProductModalComponent, |
|
41
|
|
|
AddOrEditProductModalComponent, |
|
42
|
|
|
ShowProductComponent, |
|
43
|
|
|
], |
|
44
|
|
|
imports: [ |
|
45
|
|
|
BrowserModule, |
|
46
|
|
|
AppRoutingModule, |
|
47
|
|
|
ClarityModule, |
|
48
|
|
|
BrowserAnimationsModule, |
|
49
|
|
|
HttpClientModule, |
|
50
|
|
|
ReactiveFormsModule, |
|
51
|
|
|
// ngx-translate and the loader module |
|
52
|
|
|
HttpClientModule, |
|
53
|
|
|
TranslateModule.forRoot({ |
|
54
|
|
|
loader: { |
|
55
|
|
|
provide: TranslateLoader, |
|
56
|
|
|
useFactory: HttpLoaderFactory, |
|
57
|
|
|
deps: [HttpClient] |
|
58
|
|
|
} |
|
59
|
|
|
}), |
|
60
|
|
|
], |
|
61
|
|
|
providers: [], |
|
62
|
|
|
bootstrap: [AppComponent], |
|
63
|
|
|
schemas: [CUSTOM_ELEMENTS_SCHEMA], |
|
64
|
|
|
}) |
|
65
|
|
|
|
|
66
|
|
|
export class AppModule { |
|
67
|
|
|
constructor() { |
|
68
|
|
|
ClarityIcons.addIcons(cloudIcon); |
|
69
|
|
|
} |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
// required for AOT compilation |
|
73
|
|
|
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader { |
|
74
|
|
|
return new TranslateHttpLoader(http); |
|
75
|
|
|
} |
|
76
|
|
|
|