import { BrowserModule } from '@angular/platform-browser' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ; import { NgModule } from '@angular/core' ; import { AppRoutingModule } from './app-routing.module' ; import { AppComponent } from './app.component' ; import { ChatModule } from './chat/chat.module' ; import { SharedModule } from './shared/shared.module' ; import { HttpClientModule , HttpClient } from '@angular/common/http' ; import { TranslateModule , TranslateLoader } from '@ngx-translate/core' ; import { TranslateHttpLoader } from '@ngx-translate/http-loader' ; import { MatMenuModule } from '@angular/material/menu' ; export function HttpLoaderFactory ( http ) { return new TranslateHttpLoader ( http ) ; } @ NgModule ( { declarations : [ AppComponent ] , imports : [ BrowserModule , BrowserAnimationsModule , AppRoutingModule , ChatModule , SharedModule , HttpClientModule , MatMenuModule , TranslateModule . forRoot ( { loader : { provide : TranslateLoader , useFactory : HttpLoaderFactory , deps : [ HttpClient ] } } ) ] , providers : [ ] , bootstrap : [ AppComponent ] } ) export class AppModule { }