Skip to content

AngularJS wrapper module for the official jQuery SignalR library.

License

Notifications You must be signed in to change notification settings

ethanhann/eeh-signalr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();
});

About

AngularJS wrapper module for the official jQuery SignalR library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published