angular-signalr-hub icon indicating copy to clipboard operation
angular-signalr-hub copied to clipboard

Unsubscribe proxy events

Open k-frankov opened this issue 8 years ago • 0 comments

Hi,

It would be nice if there was method to unsubscribe events. There is: if (options && options.listeners) { Object.getOwnPropertyNames(options.listeners) .filter(function (propName) { return typeof options.listeners[propName] === 'function'; }) .forEach(function (propName) { Hub.on(propName, options.listeners[propName]); }); }

so would be nice to be able to do 'off' Yes, it's possible to do hub.proxy.off('broadcastMessage'); But maybe you will add something more elegant.

k-frankov avatar Mar 09 '16 14:03 k-frankov