I am learning SignalR (using this tutorial) and have the code from my class. The problem is that when executing the following
this.init = function () {
this.hub.getAll();
}
I got Uncaught TypeError: Object # has no method 'getAll'. When examine the this.hub I saw that there is no add, update, getAll method. All these methods are one layer inner in thus.hub.server. Why does this.hub.getAll not exist? Is this.hub.getAll() and this.hub.server.getAll() the same thing? I think not because when I change my code to this.hub.server.getAll() the error went away but it did not do what it is supposed to do: loading data.
Here is the script section
@section Scripts {
@Scripts.Render("~/bundles/knockout")
@Scripts.Render("~/bundles/signalr")
<script src="/Scripts/jquery.signalR-2.0.1.min.js" type="text/javascript"></script>
<script src="signalr/hubs" type="text/javascript"></script>
<script src="/Scripts/jquery.livequery.min.js"></script>
BundleConfig.cs
bundles.Add(new ScriptBundle("~/bundles/signalr").Include(
"~/Scripts/jquery.signalR-2.0.1.min.js"));
Any ideas?
Thanks,