Skip to content

Instantly share code, notes, and snippets.

View abariatti's full-sized avatar

Arnaud 2501 abariatti

  • Lausanne, Switzerland
View GitHub Profile
@abariatti
abariatti / gist:46b2e218a3aaa1359e38
Created February 26, 2015 09:26
angularjs factory to ease signalR integration with angularjs. Modified this version http://henriquat.re/server-integration/signalr/integrateWithSignalRHubs.html to allow to pass any number of parameters to the hub and receive any number of parameters from the hub
'use strict';
angular.module('app')
.value('signalRServer', '')
.factory('signalRHubProxy', ['$rootScope', 'signalRServer', function ($rootScope, signalRServer) {
function signalRHubProxyFactory(serverUrl, hubName, startOptions) {
var connection = $.hubConnection(signalRServer);