ng-outside-click
v1.0.0
Published
Angular directive that excutes an expression when an element outside the specified element is clicked (used to close dialogs and pickers)
Downloads
119
Readme
ng-outside-click
Angular directive to evaluate expression when an element outside the directive element is clicked
Usage
<script>
var app = angular.module('app', ['ngOutsideClick']).run(function($rootScope){
$rootScope.outsideClick = function(){
console.log('clicked outside');
}
});
</script>
<div outside-click="outsideClick()">
Clicking anywhere outside this div will trigger the expression in outside-click attribute
</div>