Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<body ng-app="myApp">
<div ng-controller="MyCtrl">
<a style=" color: red" ng-click="!click||alert('Test')">Click on this and this will not alert</a> <br> <br>
<a style=" color: blue" ng-click="!click_two||alert('Test')">Click on this and this Will alert</a>
</div>
</body>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.name = 'Superhero';
$scope.alert=(item)=>{alert(item)}
$scope.click = false
$scope.click_two = true
}