1.0.2 • Published 3 years ago

ngx-outside-click v1.0.2

Weekly downloads
40
License
MIT
Repository
github
Last release
3 years ago

ngx-outside-click

Simple Angular module to detect a click outside of one element.

See interactive demo here: https://kuroidoruido.github.io/ngx-outside-click/ Demo source code here: https://github.com/kuroidoruido/ngx-outside-click/tree/master/demo

Installation

npm install ngx-outside-click

Usage

Basic

Import NgxOutsideClickModule then

<div (ngxOutsideClick)="doSomething($event)">
    ...
</div>

$event will be the ClickEvent.

Disable the listening

Import NgxOutsideClickModule then

<div (ngxOutsideClick)="doSomething($event)" [ngxOutsideClickEnabled]="false">
    ...
</div>

This way you can enable/disable on need (think about performance issue when your app can have a lot of outside click but only some of them are useful at once).

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago