Angular 2/SignalR RRS feed

  • Question

  • User412807575 posted


    I'm preparing a small demo of a working SignalR system. The missing piece is one that I have no experience writing, an Angular 2/TypeScript application running in Chrome and accessing a SignalR server NOT the source of the Angular 2 page(s). That is, I have Chrome connected to "http://localhost", but my SignalR hubs path is "http://localhost:5000/signalr/hub". Both the basic Angular 2 application and the SignalR servers are working, as verified with .NET WinForms and JavaScript clients, but I can't figure out getting an Angular 2 service started and connected, and connecting to my hub(s).

    While there are some Angular 2/SignalR samples floating around, they have not helped me get things built and connected. Either the architecture is not using Angular 2 services or I'm running into issues accessing JQuery "$.connection" (it's unknown/empty when the service tries to use it, etc.; things that should be basically easy to figure out, but where I've failed).

    Does anyone have the simplest possible Angular2/SignalR example or a link that might help (I've done a lot of searching and reading, so I doubt I've missed any)? I don't even need the server SignalR code; using one of the ASP.NET SignalR samples is fine as long as the connection path is not on the same Web site as the client page. Minimal "fanciness" is desirable; I can figure out that once I'm connected!


    Paul T.

    Tuesday, April 18, 2017 4:44 PM

All replies