Files
doneit-web/src/app/services/websocket.service.ts
T
2020-09-10 09:48:37 +01:00

22 lines
382 B
TypeScript

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();
}
}