我(再次)试图抓住SignalR,但无论我尝试哪个例子,都会失败。这次我正在处理this Scrumbaord example。
经过多次尝试失败后,我最终得到了Github代码的近1:1副本。我做的唯一更改是用“Clients.Caller ...”替换Caller.populateStories和Caller.addedStory。 我经常遇到以下错误:
Uncaught TypeError: Object #<Object> has no method 'getStories'
在以下几行:
this.init = function () {
console.log("init");
this.hub.getStories();
};
答案 0 :(得分:3)
自0.5
以来客户端语法已更改尝试
hub.server.xxx()调用服务器方法
和
hub.client.callme = functiion(){}用于客户端回调