问题描述
我正在将代码移到AngularJs中。我使用SignalR锁定我的剑道表中的记录。通常服务器会将通知推送到客户端,但在启动时我需要它来检查是否存在任何锁。我以前在 $ connection.start()。done(function(){});
中这样做但是现在我使用AngularJs我觉得我不能仍然使用它(可以吗?也许我从一开始就错了。)
我看过一些使用工厂的例子,但是作为一个使用AngularJs的n00b我不知道看看如何执行这些连接开始功能。
有人可以帮我提供示例或简单的教程链接,请^ _ ^
如果您想查看我的旧js或新的角度代码,请询问您是否认为它是相关的。
谢谢^ _ ^
Andy
PS:我正在使用网络表单,所以没有MVC,请。我还没有掌握它,但我猜Angular是相似的?
Hi,
I am moving my code into AngularJs. i use SignalR to "lock" records in my kendo table. usually the server pushes notification to the clients but on startup I need it to check for any existing locks. I used to do this within the $connection.start().done(function(){});
but now that I am using AngularJs I don't think I can still use that (can I? maybe I'm wrong from the start).
I have seen some examples of using factories, but being a n00b with AngularJs I don't see how to perform these "on connection start" function.
Could someone help me with examples or an easy tutorial link, please ^_^
If you would like to see my old js or new angular code, just ask if you think it's relevant.
Thanks ^_^
Andy
PS: I am using web forms so no MVC, please. I haven't got to grips with that yet either, but I guess Angular is similar?
推荐答案
这篇关于如何在angularjs中执行signalr任务(特别是在hub.start.done()中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!