angular-signalr-hub
angular-signalr-hub copied to clipboard
how to Obtain Signalr Connection Id
I have attempted to obtain the signalr connection Id without success.
When I do this : var conn = hub.connection; and console.log(conn); I see the id of the connection in the log, its something like this: id: "235ds-sdre65-sfde3d-sfd4rs" but when I do var conn = hub.connection.id and log it, its says id is undefined.
How do I obtain it? I can obtain all the other fields of the connection except id and token.
Can you show this with a complete example? At what time to you try to call the hub.connection.id? It should work. But only if your hub is ready and connected ofcourse...