Using jQuery in conjunction with AngularJS?

I am working on a single page for my company. We create many sites and we quickly create them, so we still rely on multi-page server templates. This means that developers in the interface almost all have to deal with CSS and jQuery for some basic DOM manipulations. This is an excellent system for what we are doing at present, but, moving to the future of sites on one page based on JS, it takes a lot of time for new project resources (especially for developers at the initial stage) to accelerate.

Currently, all of our one-page applications rely on jQuery and jQote2 for simple page transitions (for example, the entire container is simply replaced). Again, this works great because many of our sites are simple and straightforward, but it becomes a mess when we need to do something custom, and sometimes it can take developers time to figure out how to make simple changes.

I studied the use of Angular just for managing "pages" and handled the display of the correct template based on the server call. After Angular displays the page on the correct template and page, I want the front-end developer to be able to use jQuery to manage the current page, much like a multi-page site can be manipulated.

For me, the big bonus with Angular (compared to jQuery or jQM) is the element directives. It’s easy and understandable for a developer to launch a site, take a quick look at the DOM and understand how it changes.

Essentially, I want Angular to serve as a controller (and, if necessary, a model), then go on to view for jQuery to interact. Is it possible to use Angular with jQuery this way?

Is Angular a complete excess for such a simple task? (I know that I can write something custom, but Angular just seems successful, and it has the ability to easily expand to our larger sites)

+6
source share
1 answer

It is not possible to use angularjs, as this is a great basis for expandability of the project. The MVC structure also makes it powerful. For angularjs and jquery relationships see this ,, this

+4
source

Source: https://habr.com/ru/post/949624/


All Articles