{"repo":"rodgc/ngx-socket-io","free":true,"listed":false,"github":"https://github.com/rodgc/ngx-socket-io","clone":"git clone https://github.com/rodgc/ngx-socket-io.git","description":"Socket.IO module for Angular","language":"TypeScript","stars":274,"topics":["angular","tyepscript","socket-io","javascript","angular4","angular2","socket","ngx-socket-io"],"license":"MIT","category":"ui-components","readme_excerpt":"ngx-socket-io Socket.IO module for Angular Install npm install ngx-socket-io Important: Make sure you're using the proper corresponding version of socket.io on the server. Package Version Socket-io Server Version Angular version Notes --------------- ------------------------ --------------- -------- v4.11.0 v4.8.1 22.x Zoneless v4.10.0 v4.8.1 21.x Zoneless v4.9.1 v4.8.1 20.x Zoneless v4.9.0 v4.8.1 20.x v4.8.1 v4.8.1 19.x v4.7.0 v4.7.2 18.x v4.6.1 v4.7.2 17.x v4.5.0 v4.5.1 16.x v4.4.0 v4.5.1 15.x v4.3.0 v4.5.1 14.x v4.2.0 v4.0.0 13.x v4.1.0 v4.0.0 12.x v3.4.0 v2.2.0 How to use Import and configure SocketIoModule for NgModule based applications We need to configure SocketIoModule module using the object config of type SocketIoConfig , this object accepts two optional properties they are the same used here [io(url[, options])](https://socket.io/docs/v4/client-initialization/#Options). Now we pass the configuration to the static method forRoot of SocketIoModule Import and configure SocketIoModule for standalone based applications In app.config.ts use the following: In standalone applications, there is no AppModule to import SocketIoModule . Instead, we use provideSocketIo(config) directly in the providers' configuration. The usage of the socket instance remains the same as in an NgModule-based application. Using your socket Instance The SocketIoModule provides now a configured Socket service that can be injected anywhere inside the AppModule . Using multiple sockets with differen","default_branch":null,"files":null,"tree":[],"storefront":"/r/rodgc","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rodgc/ngx-socket-io/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}