Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular UI Bootstrap just does nothing (no error, not working)

I`m trying to use Angular UI Bootstrap:

I did the following:

  • Install it with bower: bower install angular-bootstrap
  • Include it in js: var myapp = angular.module('myApp', [ 'ui.bootstrap' ]);
  • Add styles: .nav, .pagination, .carousel, .panel-title a { cursor: pointer; }

Bootstrap 3 CSS is included, angular.element.fn.jquery returns "2.1.4", so it should not use jqlite.

When I add e.g.:

<a href="#" tooltip-placement="left" uib-tooltip="On the Left!">Whatever</a>

To my template, nothing happens. When I add other bootstrap ui examples, it also does not do anything. There are no javascript errors. My angular.js version is 1.4.1.

What more could I have done wrong? Do I have to do something with my controller?

like image 827
user1383029 Avatar asked Oct 09 '15 12:10

user1383029


People also ask

Why bootstrap is not working on angular?

If you are adding the bootstrap path into the angular. json file, make sure it is the styles within the project\architect\build. Not the one in the project\architect\test.

Can I use bootstrap with AngularJS?

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


1 Answers

Be sure you are using the last version of ui-bootstrap. I'm adding this answer as a quick reference for anyone having this problem:

The tooltip attribute (directive) changed from tooltip in ui-bootstrap 0.13.X to uib-tooltip from version 0.14.0 and up.

If for some reason you can't use the latest version (currently 1.2.X) use the tooltip directive and always check the docs for your version of ui-bootstrap at:

ui bootstrap

like image 101
Pedro Figueiredo Avatar answered Oct 07 '22 21:10

Pedro Figueiredo