import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { BrowserModule } from '@angular/platform-browser' ; import { HttpClientModule , HttpClient } from '@angular/common/http' ; import { TranslateModule , TranslateLoader } from '@ngx-translate/core' ; import { FormsModule , ReactiveFormsModule } from '@angular/forms' ; import { TranslateHttpLoader } from '@ngx-translate/http-loader' ; import { AppComponent } from './app.component' ; import { AppRoutingModule } from './app-routing.module' ; import { CoreModule } from './core/core.module' ; import { HomeComponent } from './modules/home/home.component' ; import { PageNotFoundComponent } from './modules/page-not-found/page-not-found.component' ; import { CreateComponent } from './modules/create/create.component' ; import { ProjectModule } from './modules/project/project.module' ; import { SharedModule } from './shared/shared.module' ; import { ImportComponent } from './modules/import/import.component' ; import { SettingsComponent } from './modules/settings/settings.component' ; export function HttpLoaderFactory ( http ) { return new TranslateHttpLoader ( http ) ; } @ NgModule ( { declarations : [ AppComponent , HomeComponent , CreateComponent , ImportComponent , SettingsComponent , PageNotFoundComponent , ] , imports : [ CommonModule , BrowserModule , HttpClientModule , FormsModule , CoreModule , ProjectModule , SharedModule , ReactiveFormsModule , AppRoutingModule , TranslateModule . forRoot ( { loader : { provide : TranslateLoader , useFactory : HttpLoaderFactory , deps : [ HttpClient ] , } , } ) , ] , providers : [ ] , bootstrap : [ AppComponent , ] } ) export class AppModule { }