angularjsjqlite

Why are we using angular js framework instead of using jQuery or JQLite directly?


I am using angularJS for my application development and I am using JQuery UI in few places of my code. 1. Whether it will end up in performance when I use JQuery in my code. 2. Why to use angular if I can use JQuery / JQLite directly to my application.


Solution

  • Angular is a framework and jQuery is a library. You can't really ask "why should I use AngularJs instead of Jquery?" since they are not the same.

    Angular as a framework provides a lot of powerful tools that can help with building web applications. However if you are not building anything particularly over the top you could simply just use the few pieces of jQuery you need.

    Overall it comes down to what you are trying to do. If you want to build a powerful SPA with a level of ease, Angular is great. If you're just adding some flair to a static web page jQuery is probably a better approach.