Closed AbrarJahin closed 4 years ago
Yould you specify, what problem you've got with the integration in angular2?
The usual way of integrating this lib in angular2 would be to implement one service for managing the connection and a couple of other services, using the first one and providing the different hubs.
Maybe I've got some sparetime at some weekend to build a little example gist, without angular2 integration, but giving an idea of how to use signalR.
If you can give a example code, that would be great help.
Thanks @sateffen
@AbrarJahin A basic example can be found here in the readme. I'm currently testing an own version of a jqueryless signalr, which contains the correct signalr version (not on npm yet, nor tested anywhere).
You can use the code as it stands, just replace const signalR = require('jqueryless-signalr');
with const signalR = require('signalr-no-jquery').hubConnection;
That might not be angular2 specific code, but adapting that one for an angular2 service should be trivial.
Thanks to you both @sateffen @BissacM
I also needed to add the types like this
npm install --save @types/signalr-no-jquery
and also I didn't need the new on the hubConnection
Hi, I like to use it with Angular2.
Is there any way of doing that?
Is there any example from which I can see demo code for that?
Thanks