angular-signalr-hub
angular-signalr-hub copied to clipboard
Websockets interceptor ?
Hi, I'm finding a way to support global interceptor for websockets like http interceptor.
Like this:
if (options && options.methods) {
angular.forEach(options.methods, function (method) {
Hub[method] = function () {
var args = $.makeArray(arguments);
args.unshift(method);
alert('display loading...');
return Hub.invoke.apply(Hub, args);
// How to handle promise after method done or fail ?
};
});
}
Anyway to solve this without handle in controller ?