AngularJS and Bootstrap's split button dropdown
angular-ui, angularjs, twitter-bootstrap
Solution
Look at this demo : http://jsfiddle.net/guillaumebiton/8muRC/
Only the power of Angular:
<div class="btn-group" ng-class='{open: open}'>
<button class="btn">Action</button>
<button class="btn dropdown-toggle" data-toggle="dropdown" ng-click='open=!open'>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>
It only use one variable 'open' which is true or false.
Problem
Do you know if someone ported Bootstrap's scripts to AngularJS? I need Bootstrap's split button dropdown for my app and I'd really like to avoid pulling jQuery in. I seem to fail to google this out.