Web Socket
Installation
npm i @ngxs/websocket-plugin
# or if you are using yarn
yarn add @ngxs/websocket-plugin
# or if you are using pnpm
pnpm i @ngxs/websocket-pluginConfiguration
import { provideStore } from '@ngxs/store';
import { withNgxsWebSocketPlugin } from '@ngxs/websocket-plugin';
export const appConfig: ApplicationConfig = {
providers: [
provideStore(
[],
withNgxsWebSocketPlugin({
url: 'ws://localhost:4200'
})
)
]
};Usage

Last updated

