Reputation: 4388
Hey guys so I am trying to use $event.stopPropagation because I have many different clicks in one container that need to be independent and I handle them using $event.stopPropagation as well, but when it comes to bootstrap, I cannot for some reason make it work . The context menu click is detected as actual ng-click on the whole container. How can I make the twitter bootstrap context menu act as if it had $event.stopPropagation?
<div ng-app='project' ng-click="myClick()">
<div ng-controller="MainController" ng-click="myClick($event)">
<div>
<div class="header" >
dasdasdasdasd
</div>
</div>
<div class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Menu</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" ng-click="">One</a></li>
<li><a tabindex="-1" ng-click="">Two</a></li>
</ul>
</div>
</div>
</div>
Upvotes: 0
Views: 3363
Reputation: 5379
Bootstrap does not use Angular mechanism, namely $apply/$digest cycle, to handle events. You might want to check out the angular bootstrap project: http://angular-ui.github.io/bootstrap.
Upvotes: 1