Angular.js 和 JQuery 如何协同使用?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-15 16:52:51
0
2
567

在angular中,有jqlite。

如果项目中引入了jquery后,就会将jqlite指向jqurey,否则就是使用自己封装的一个简易jquery。

但是无论是哪一种,可用的api都是限定的,没有jquery多。

特别是在angular的指令中,所以我就很疑惑,这两者该如何协同,完全发挥各自的优势呢?

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

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!