1
votes

I want to integrate SignalR with an AngularJs app.

$scope.ceva = function () {
    var proxy = $.connection.chatHub;
    $.connection.hub.start().done(function () {
        console.log("started");
    })
}

I included the next file: <script src="http://ajax.aspnetcdn.com/ajax/signalr/jquery.signalr-2.2.0.js"></script>

But I get the following error: SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. script src='/signalr/js'>

What files do I need to load?

Edit:

So I understood that I need to load the dynamically generated Hub. How could I do that in WebApi??

1

1 Answers

1
votes

You forgot the SignalR dynamic script (should be placed underneath the jquery.signalr script reference):

<script src="~/signalr/hubs"></script>