How do Angular.js and JQuery work together?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-15 16:52:51
0
2
599

In angular, there is jqlite.

If jquery is introduced in the project, jqlite will be pointed to jqurey, otherwise a simple jquery encapsulated by itself will be used.

But no matter which one it is, the available APIs are limited and not as many as jquery.

Especially in the angular instructions, so I am very confused, how can the two work together to fully utilize their respective advantages?

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(2)
刘奇

Unless some libraries depend on jQuery, don’t introduce jq. If it can be written in ng, don’t use jq...

ng's built-in DOM operation is sufficient. Moreover, ng applications should not manually operate the DOM except for directives. If you want to use jq, it is in the directive.

过去多啦不再A梦

Angular Js has its own one called jqlite, which is roughly similar to jQuery in usage, but not as complete;
If you reference the complete jQuery library in the header, you don’t need to consider jqlite.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template