1

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 is based on jQuery.

Is it safe to use socket.io in Angular, considering Angular ships with an internal "jqLite"? Is it enough for socket.io?

Is it safe, regarding Angular, if I include a jQuery version? will it cause -an official jquery- unexpected behaviors on Angular -assume I use, at most, Angular and ngRoute-, or will it be fully compatible?

I'm a n00b at angular internals and socket.io :$

2
  • 1
    Socket.io is not based on jQuery. Socket.io does not have any relation/dependency to jQuery. Commented Jul 31, 2014 at 16:31
  • 1
    Seems I misread the samples sources :s. Commented Aug 1, 2014 at 14:28

1 Answer 1

3

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. It's supported and should not cause any problems.

https://docs.angularjs.org/api/ng/function/angular.element

Sign up to request clarification or add additional context in comments.

1 Comment

Cool! Did not know jqLite was just a fallback. I thought it was mandatory and non-compatible :p.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.