Mixing Angular.js and Bootstrap 3 - where are incompatible?

This is a conceptual question. I am considering adding AngularJS to my next project, for which I have already chosen to use Twitter Bootstrap 3 for user interface controls. I see some possible friction in other stackoverflow issues between the two frameworks, but I'm not quite sure what is the main reason for the possible incompatibilities between the two.

They both listen to events, but the bootstrap is basically a front-end interface library, whereas, in my opinion, angular.js is much deeper. Perhaps someone can fundamentally explain where incompatibilities arise. We hope that direct lending will determine whether it is a good idea to mix the two in one project or what should be avoided if this is done. This will save a huge amount of time accounting through debugging after too late or to avoid the wrong architecture in the first place.

+6
source share
1 answer

A potential problem is that Bootstrap uses jQuery for a large number of its user interfaces. Everything that jQuery has changed is not reflected in Angular itself, for example, when checking a checkbox using "normal" javascript (or jquery) will not automatically update its ng-model in the way the user will check it.

I would say that most boot plugins can be included in directives, as Angular -strap did. But it can be a lot of work. Some common ones (e.g. growl) are also available as standalone Angular projects on Github.

+7
source

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


All Articles