What's wrong with mixing jQuery with backbone.js / angular.js / ember.js?

I came from backend dev to frontend dev quite recently, so I am completely new here and am in a lot of trouble cleaning my head.

One problem is that I was trying to integrate twitter-bootstrap-3 with one of the mvvm frameworks called backbone.js, angular.js and ember.js. I was very confused to see some repos in GH trying to rewrite some part of the bootstrap js part. What's wrong with jQuery in this framework? Wouldn't it be wrong to mix jQuery code within this framework? Many thanks!

+3


source to share


1 answer


I can only speak with Angular.js for loading conflicts. The main issues are what bootstrap uses by default location.hash

for things like data-toggle

. This conflicts with angular route management, which uses a hash as the route for your SPA.

Also, if you want to control loading actions such as modals with angular runtime actions, it is much easier to do so with a help ui.bootstrap

that provides services and directives that work well with Angular.



I would guess that similar problems can occur with ember, etc.

Note that in theory you can use them at the same time, they are not inherently incompatible, but it can be painful to marry them without using pre-existing solutions.

0


source







All Articles