data-toggle not working in 0.12.0 version
I upgraded AngularJS to 1.3 and bootstrap to 0.12.0. Now, the data-toggle is not working. It is not throwing any error also.
Given below is the sample HTML.
http://plnkr.co/edit/rwna6h9vubWVI7SHGcqH?p=preview
<div class="btn-group dropup error-display">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"
type="button"><span class="item-error ng-binding">Name is
required.</span> <span class="caret caret-reversed"></span></button>
<ul class="dropdown-menu">
<li class="errorFieldset ng-binding">Field Errors:</li>
<li>
<!-- ngRepeat: d in errData --><a class=
"ng-binding ng-scope"><span class="fa fa-times-circle" style=
"font-style: italic"></span>Name is required.</a>
<!-- end ngRepeat: d in errData --><a class=
"ng-binding ng-scope"><span class="fa fa-times-circle" style=
"font-style: italic"></span>Company is required</a>
<!-- end ngRepeat: d in errData --><a class=
</li>
</ul>
</div>
Thanks
I confirm the problem. The dropdown fails silently with AngularJS 1.3 and angular-ui.bootstrap 0.12.0 .
I'm having the same problem
same problem with AngularJS v1.2.27 and angular-ui-bootstrap 0.12.0 data-toggle was working fine in 0.10.0
Here as well, going back to 0.11.2 and 1.2.27 still works
Anyone found a workaround?
Adding both
<button class="btn dropdown-toggle" dropdown-toggle type="button">
class and dropdown-toggle helped for me.
In version 0.12, There are 2 directives for the dropdown functionality:
- dropdown
- dropdown-toggle
and they both are restricted to 'attribute'. They are NOT class directive. Having class="dropdown" and class="dropdown-toggle" will not work. It is not a bug, but a breaking change with respect to earlier releases.
In version 0.10: https://github.com/angular-ui/bootstrap/blob/0.10.0/src/dropdownToggle/dropdownToggle.js there was only 1 directive 'dropdown-toggle' which was restricted to 'attribute' or 'class'
See this commit https://github.com/angular-ui/bootstrap/commit/192768e109b5c4a50c7dcd320e09d05fedd4298a for more info.
This issue should be closed.
Thanks @antoinepairet for the clarification