Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethanhann/eeh-signalr
AngularJS wrapper module for the official jQuery SignalR library.
https://github.com/ethanhann/eeh-signalr
angular angularjs angularjs-wrapper eeh-signalr javascript signalr
Last synced: about 1 month ago
JSON representation
AngularJS wrapper module for the official jQuery SignalR library.
- Host: GitHub
- URL: https://github.com/ethanhann/eeh-signalr
- Owner: ethanhann
- License: mit
- Created: 2015-03-30T02:09:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-10T02:36:56.000Z (over 9 years ago)
- Last Synced: 2024-11-12T14:54:04.692Z (about 1 month ago)
- Topics: angular, angularjs, angularjs-wrapper, eeh-signalr, javascript, signalr
- Language: JavaScript
- Size: 176 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.```js
angular.module('myApp').config(function (eehSignalRProvider) {
eehSignalRProvider.url('http://example.com/myCustomSignalRUrl');
});
```### Inject the eehSignalR Service in a Controller (or somewhere else)
```js
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();
});
```