mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Added chat integration with socket.io
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user