0

I am currently developing an application where I need some richer elements. Some of these are searches live updating, adding checkboxes to arrays and the like.

I have successfully implemented this using AngularJS, but I am not really sure if it's good practice to use AngularJS on just a few pages.

Would it be better practice to use JQuery for this purpose, and does it go against the goal of AngularJS?

1
  • 2
    angularjs is more of a framework than just a library. if your goal is to just add these modules consider using jquery-ui than angularjs but if you are building application with Rest data in larger scope you can go with angular Commented Oct 9, 2013 at 19:19

2 Answers 2

2

Yea the transition from AngularJS can be a difficult one. Of course, they can both be used side-by-side but it kinda defeats the purpose of Angular. I use to be big jQuery user but I've tried to stay as far away from it as I can when using Angular.

Sometimes I'll come across a problem and I'll think to myself "Wow this would be so simple to do in jQuery". But if I stick to Angular and use their philosophy, I find that the "Angular" solution is often the one that uses better coding practices.

TL;DR: AngularJS and jQuery work fine side-by-side but I recommend getting into the habit of using just Angular, as it will result in more organized, maintainable and understandable code.

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

Comments

1

They can be used together. The two libraries have different purposes. jQuery provides an alternate interface to the DOM that is more consistent across all the browsers, so you don't have to worry about various browser eccentricities. AngularJS is a framework that provides for such things like binding MVC-style objects on the client side.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.