SignalR Push Notifications in Ionic4

install this library

npm install ng2-signalr jquery signalr --saveadd this in angular.json file"scripts": [{"input":"node_modules/jquery/dist/jquery.min.js"},{"input":"node_modules/signalr/jquery.signalR.js"}]in app.module.ts->import { SignalRModule } from 'ng2-signalr';import { SignalRConfiguration } from 'ng2-signalr';export function createConfig(): SignalRConfiguration {let config = new SignalRConfiguration();config.url = 'http://localhost:8000/signalr/';config.hubName = "diyhub";config.logging = true;config.executeErrorsInZone = true;config.executeEventsInZone = true;config.executeStatusChangeInZone = true;return config;}imports: [
],for receiving the notifications useconnect() {let o: IConnectionOptions;let conx = this._signalR.createConnection();conx.status.subscribe((s) => console.warn(;conx.start().then((c) => {console.log('121212 12121',c)let listener = c.listenFor('PickStatusCommand');listener.subscribe((data) => {console.log('received hello',data);});});}



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store