Added chat integration with socket.io

This commit is contained in:
Tiago Kayaya
2020-09-10 09:48:37 +01:00
parent b8e3623045
commit c4e52172ef
20 changed files with 410 additions and 151 deletions
+21
View File
@@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import * as io from 'socket.io-client';
import { Observable } from 'rxjs';
import { Socket } from 'ngx-socket-io';
@Injectable({
providedIn: 'root'
})
export class WebsocketService {
message = '';
messages = [];
currentUser = '';
constructor(private socket: Socket) { }
connect(){
return this.socket.connect();
}
}