0.0.1 • Published 9 years ago

tnp-click-outside v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

ng-click-outside

An angular directive to bind an action for a click outside the element. Uses the service for single event listener on document and destructor on each element with directive to avoid memory leaks.

###Installation

Bower

$ bower install ng-click-outside --save

NPM

$ npm install ng-click-outside --save

###Usage

Basic example:

app.module('app', ['tenphi.clickOutside']);
<div class="dropdown" tnp-click-outside="open = false">
  <div class="dropdown-link" ng-click="open = !open"></div>
  <div class="dropdown-content" ng-show="open"></div>
</div>