Using Jquery inside AngularJS directive good or bad idea?

前端 未结 3 1920
萌比男神i
萌比男神i 2021-02-07 22:00

Below you can see my code for the directive.

My question is: \" Can i use jquery with directives? Is that a good idea? If not why? \"

o         


        
3条回答
  •  情话喂你
    2021-02-07 22:43

    Simple Answer: YES (Simply refer jquery.js above Angular.js in HTML page. jqLite will be replaced by jQuery)

    You would be using jQuery for DOM manipulation & there are many discussions going on this topic (whether to use or not in modern browsers).

    One of the popular posts in the recentdays: http://lea.verou.me/2015/04/jquery-considered-harmful/

    Despite everything, jQuery is still a very popular, highly used DOM library. And, it works with many modern UI frameworks seamlessly.

提交回复
热议问题