Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 467 Bytes

README.md

File metadata and controls

16 lines (15 loc) · 467 Bytes

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>