Build a website with jquery and angularjs

I read in Angular FAQs that "Angular can use jQuery if it is present in your application when the application is bootstraped."

My question is, is this good practice or will there be a conflict or performance issue if the site contains jquery and angularjs scripts?

I plan to create a site that will contain both jquery and angularjs.

The reason for this is that I plan to use jquery mainly for plugins such as carousel, slide shows, lightbox, calendar, form validation, etc., and angular ones will be mainly used for data binding. (basically an ajax request, then binds it to the table using ng-repeat, etc.)

Do you think this is a good approach or should I just stick to just one (jquery or angular) to complete the whole process?

This is because I'm not sure how many plugins, such as carousels, slide shows, lightboxes, etc., are available in angular, and if I can find plugins that may be present in jquery but not in angular .

Thanks a lot!

+4
source share
4 answers

AngularJS jQuery. Angular jQuery: jqLite. , jQuery. , . jQuery.

jQuery Angular . " jQuery" "Angular" - , . jQuery, . Angular (, ng-click $(selector).on('click',...) ), - ).

. jQuery, Angular . jQuery , jQuery, .

+1

, , Angular, jQuery.

, , .

:

, jquery , -, , , .. angularjs . ( ajax , ng-repeat ..)

, (ui bootstrap) , , , -, , , Angular Directives (Angular) DOM). Angular - jQuery. , * Angular, .

, , - . Angular, . ( ). , :

<input type="email" ng-model="person.email" ng-required />

Angular , , . , . . , .

, , google Angular, , . , , , Angular.

, !

* , Angular ..... .. ..

0

. BTW, jQlite Angular...

-1

Not recommended for use jquerywith angular js.Angular consists of almost all the functions that you can get from jquery.

Although, if you have certain scenarios that require strict binding of the model model to angular js, and you want to use jquery for your other work, you can use both in the same project.

-1
source

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


All Articles