Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does one need jQuery when using Twitter Bootstrap with Angular.js?

Is the jQLite (in built with AngularJS) sufficient to execute javascript functionality (like dropdowns) in Twitter Bootstrap?

docs.angularjs says:

DOM Manipulation from Stop trying to use jQuery to modify the DOM in controllers. Really. That includes adding elements, removing elements, retrieving their contents, showing and hiding them. Use built-in directives, or write your own where necessary, to do your DOM manipulation. See below about duplicating functionality.

like image 209
Sangram Singh Avatar asked Aug 01 '13 06:08

Sangram Singh


People also ask

Can we use jQuery and AngularJS together?

Yes, AngularJS can use jQuery if it's present in your app when the application is being bootstrapped. If jQuery is not present in your script path, AngularJS falls back to its own implementation of the subset of jQuery that we call jQLite.

Can Bootstrap be used with AngularJS?

AngularJS can be integrated with Bootstrap CSS and Javascript and can be used to create creative forms, tables, navigation bars, etc.

What is $Uibmodal?

$uibmodal is a service to create modal windows. Uibmodal is the UI Bootstrap component written in AngularJS. It enables us to use Bootstrap in AngularJS. It provides directives for all bootstrap with some extra like, datepicker, timepicker etc.

What is UI Bootstrap?

Bootstrap UI is a consistent library of design patterns for building beautiful and intuitive web apps on Bootstrap, the most popular CSS framework on the web.


1 Answers

According to the Angular UI Github, no.

Native AngularJS (Angular) directives for Twitter's Bootstrap. Small footprint (5kB gzipped!), no 3rd party JS dependencies (jQuery, bootstrap JS) required! 
http://angular-ui.github.io/bootstrap/

Though bear in mind this is a wrapper made specifically for Angular UI, you may/may not be able to easily use bootstrap plugins others have written with this.

However with a default Angular UI & copy of bootstrap then you'll need jQuery as the code in the github repository has been heavily modified to work without jQuery.

[Edit] As noted in the comments UI Bootstrap is a very good option as well.

like image 54
Ryan McDonough Avatar answered Sep 21 '22 19:09

Ryan McDonough