eeh-signalr

AngularJS wrapper module for the official jQuery SignalR library.

Added by: Sam Deering

GitHub

Repository

ethanhann/eeh-signalr

Stats

Stars: 1

Watchers: 1

Forks: 0

Author

Ethan Hann
Ethan Hann

Module Description

eeh-signalr

AngularJS wrapper module for the official jQuery SignalR client.

Usage

(Optional) Configure the SignalR URL

The URL is '/signalr' by default. If it is set to another value on the server, or if CORS is in use, it can be set when you configure your app.

angular.module('myApp').config(function (eehSignalRProvider) {
    eehSignalRProvider.url('http://example.com/myCustomSignalRUrl');
});

Inject the eehSignalR Service in a Controller (or somewhere else)

angular.module('myApp')
.controller('MainCtrl', function ($scope, eehSignalR) {
    var hub = eehSignalR.getHub('assetHub');
    hub.client.hello = function (message) {
        $scope.message = message;
        $scope.$apply();
    };
    eehSignalR.start();
});

Module stats last updated: 2015-04-19 02:08:37

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!