Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

119 wiersze
4.8 KiB

  1. import {NgModule} from '@angular/core';
  2. import {BrowserModule} from '@angular/platform-browser';
  3. import {ReactiveFormsModule} from '@angular/forms';
  4. import {HttpClientModule, HTTP_INTERCEPTORS, HttpClient} from '@angular/common/http';
  5. import {AppRoutingModule} from './app-routing.module';
  6. import {JwtInterceptor, ErrorInterceptor} from './_helpers';
  7. import {AppComponent} from './app.component';
  8. import {AlertComponent} from './_components';
  9. import {HomeComponent} from './home';
  10. import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
  11. import {ApiModule, Configuration, ConfigurationParameters} from "@app/core/api/v1";
  12. import {environment} from "@environments/environment";
  13. import {MatCardModule} from "@angular/material/card";
  14. import {TranslateLoader, TranslateModule} from "@ngx-translate/core";
  15. import {TranslateHttpLoader} from "@ngx-translate/http-loader";
  16. import {NgOptimizedImage} from "@angular/common";
  17. import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
  18. import {TwoColumnComponent} from './layout/two-column/two-column.component';
  19. import {ProductsComponent} from './products/products.component';
  20. import {ProductsDetailComponent} from './products/products-detail/products-detail.component';
  21. import {DocumentsComponent} from './documents/documents.component';
  22. import {PartnersComponent} from './partners/partners.component';
  23. import {PartnersDetailComponent} from './partners/partners-detail/partners-detail.component';
  24. import {NewContactComponent} from './contacts/new-contact/new-contact.component';
  25. import {ContactsComponent} from './contacts/contacts.component';
  26. import {ContactsDetailComponent} from './contacts/contacts-detail/contacts-detail.component';
  27. import {ModalComponent} from './_components/modal/modal.component';
  28. import {PropertyInterceptor} from "@app/_helpers/property.interceptor";
  29. import {MatPaginatorModule} from "@angular/material/paginator";
  30. import {MatSortModule} from "@angular/material/sort";
  31. import {MatTableModule} from "@angular/material/table";
  32. import { PostingsComponent } from './postings/postings.component';
  33. import { NewPostingComponent } from './postings/new-posting/new-posting.component';
  34. import { TasksComponent } from './tasks/tasks.component';
  35. import { NewTaskComponent } from './tasks/new-task/new-task.component';
  36. import { NewPartnerComponent } from './partners/new-partner/new-partner.component';
  37. import { NewDocumentComponent } from './documents/new-document/new-document.component';
  38. import { NewProductComponent } from './products/new-product/new-product.component';
  39. import { NewCommentComponent } from './postings/new-comment/new-comment.component';
  40. import {MatOptionModule} from "@angular/material/core";
  41. import {MatAutocompleteModule} from "@angular/material/autocomplete";
  42. import {MatFormFieldModule} from "@angular/material/form-field";
  43. import {MatInputModule} from "@angular/material/input";
  44. export function apiConfigFactory(): Configuration {
  45. const params: ConfigurationParameters = {
  46. basePath: environment.basePath,
  47. withCredentials: false
  48. };
  49. return new Configuration(params);
  50. }
  51. // AoT requires an exported function for factories
  52. export function HttpLoaderFactory(http: HttpClient) {
  53. return new TranslateHttpLoader(http);
  54. }
  55. @NgModule({
  56. imports: [
  57. ApiModule.forRoot(apiConfigFactory),
  58. BrowserModule,
  59. BrowserAnimationsModule,
  60. TranslateModule.forRoot({
  61. defaultLanguage: 'de',
  62. loader: {
  63. provide: TranslateLoader,
  64. useFactory: HttpLoaderFactory,
  65. deps: [HttpClient]
  66. }
  67. }),
  68. ReactiveFormsModule,
  69. HttpClientModule,
  70. NgbModule,
  71. AppRoutingModule,
  72. MatCardModule,
  73. NgOptimizedImage,
  74. PartnersComponent,
  75. ProductsComponent,
  76. DocumentsComponent,
  77. MatPaginatorModule,
  78. MatSortModule,
  79. MatTableModule,
  80. MatOptionModule,
  81. MatAutocompleteModule,
  82. MatFormFieldModule,
  83. MatInputModule
  84. ],
  85. declarations: [
  86. AppComponent,
  87. AlertComponent,
  88. HomeComponent,
  89. TwoColumnComponent,
  90. ProductsDetailComponent,
  91. ModalComponent,
  92. PartnersDetailComponent,
  93. NewContactComponent,
  94. ContactsComponent,
  95. ContactsDetailComponent,
  96. PostingsComponent,
  97. NewPostingComponent,
  98. TasksComponent,
  99. NewTaskComponent,
  100. NewPartnerComponent,
  101. NewDocumentComponent,
  102. NewProductComponent,
  103. NewCommentComponent
  104. ],
  105. providers: [
  106. {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},
  107. {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true},
  108. {provide: HTTP_INTERCEPTORS, useClass: PropertyInterceptor, multi: true},
  109. ],
  110. bootstrap: [AppComponent]
  111. })
  112. export class AppModule {
  113. };