A simple WebSocket connection manager for Angular 4+ applications. Current version 0.4.2 is highly unstable and explicitly warns against use in production due to potential breaking changes without notice. Ships TypeScript types and requires Angular 6+ (peer deps). Minimal documentation and incomplete error handling (as noted in TODOs). Not recommended for new projects; consider alternatives like RxJS WebSocket or ngx-socket-io.
npm install ngx-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing the module, injecting services, and opening a WebSocket connection.
Do not use in production. Consider RxJS WebSocket or ngx-socket-io instead.
Migrate to a maintained WebSocket library like rxjs/webSocket or ngx-socket-io.
Refer to minimal examples in README; avoid relying on undocumented features.
Use 'import { ... } from 'ngx-websocket';' – the library ships its own types.Add 'NgxWebSocketModule' to the imports array of your @NgModule.
Cast to 'any' or define a custom interface. Example: '(this.service.open(...) as any).message(...)'.