Alexander Zeitler

No more leaky abstractions

Need to click twice when using Bootstrap Dropdown with AngularJS Bootstrap Directives

Geschrieben von Alexander Zeitler am 03. August 2014

Tags: englishangularjsbootstrap

When using AngularJS with Angular-Bootstrap Dropdowns, it might happen that you need to click twice in order to open a Bootstrap dropdown menu.

menu_click_twice.png

This happens if you’re referencing both bootstrap(.min).js as well as the Angular-Bootstrap directives, e.g. ui-bootstrap-tpls.min.js:

<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>

Just remove the reference to bootstrap.min.js and just use the Angular-Bootstrap directives and your dropdown will work as expected.

blog comments powered by Disqus