Is there a way to recognize that angular-bootstrap dropdown-menu is closed? I want to recognize this event and run specific function.
<div class="btn-group" dropdown is-open="status.isopen">
<button type="button" class="btn btn-primary dropdown-toggle" dropdown-toggle ng-disabled="disabled">
Button dropdown <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="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>
Add to your parent div an on-toggle event
<div class="btn-group" dropdown is-open="status.isopen" on-toggle="toggled(open)">
And handle it witin the controller
$scope.toggled = function(open) {
if (open) {
console.log('is open');
} else console.log('close');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With