- Socket.io client:
npm install -S socket.io-client
- Socket.io types definition:
npm install -D @types/socket.io-client
- Copy
socket.service.ts
to project directory - Import SocketService in module providers
- Inject SocketService to component class
constructor (private readonly socket: SocketService) {