JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="ExApp">
<div ng-controller="ExCtrl">
<div ng-click="foo()">
<a ng-click="bar(e)">Bar</a>
<p>Lorem Ipsun</p>
</div>
</div>
</div>
JavaScript
angular.module('ExApp',[]);
angular.module('ExApp')
.controller('ExCtrl',function($scope){
$scope.foo = function(){
alert('foo');
};
$scope.bar = function(e){
alert('bar');
event = event || window.event
// cross-browser event
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
};
});