my-chat-room/apps/chat-room/src/app/app.module.ts

26 lines
617 B
TypeScript

import { HttpClientModule } from '@angular/common/http';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
import { AppComponent } from './app.component';
import { FormsModule } from '@angular/forms';
const config: SocketIoConfig = {
url: ':4001',
options: {},
};
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
HttpClientModule,
FormsModule,
SocketIoModule.forRoot(config),
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}