[英]Using socket.io AND angularjs
I'm developing a socket.io compatible project (this means: the client library is socket.io, and the server is implemented in python, instead of nodejs). 我正在开发一个socket.io兼容项目(这意味着:客户端库是socket.io,服务器是用python而不是nodejs实现的)。
Socket.io is based on jQuery. Socket.io基于jQuery。
Is it safe to use socket.io in Angular, considering Angular ships with an internal "jqLite"? 在Angular中使用socket.io是否安全,考虑到Angular船只有一个内部“jqLite”? Is it enough for socket.io?
socket.io就够了吗?
Is it safe, regarding Angular, if I include a jQuery version? 关于Angular,如果我包含一个jQuery版本,它是否安全? will it cause -an official jquery- unexpected behaviors on Angular -assume I use, at most, Angular and ngRoute-, or will it be fully compatible?
它会导致 - Angular上的官方jquery-意外行为 - 我最多使用Angular和ngRoute-,还是完全兼容?
I'm a n00b at angular internals and socket.io :$ 我是角内部和socket.io的一个n00b:$
It won't cause problems. 它不会引起问题。
You just need to make sure you load jquery before angular, if jquery is loaded angular uses the loaded full jquery instead of jqlite. 你只需要确保在angular之前加载jquery,如果加载jquery,则使用加载的完整jquery而不是jqlite。 It's supported and should not cause any problems.
它受到支持,不应该导致任何问题。
https://docs.angularjs.org/api/ng/function/angular.element https://docs.angularjs.org/api/ng/function/angular.element
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.