Skip to content

Websockets interceptor ? #85

Open
Open
@trinvh

Description

@trinvh

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions