ngx-yazuo-click-outside
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

NgxYazuoClickOutside

Installation

npm install --save ngx-yazuo-click-outside

Usage

Module:

Import NgxYazuoClickOutside from ngx-yazuo-click-outside

import { NgxYazuoClickOutsideModule } from 'ngx-yazuo-click-outside';
 
@NgModule({
  // ...
  imports: [
    NgxYazuoClickOutsideModule
  ]
  // ...
})
export class MyAppModule {}

Markup

Use the NgxYazuoClickOutsideDirective passing the parameters allowedClickedClasses and allowedClickedIds for classes and id's to allow clicking, respectively.

    <div class="content" (ngx-yazuo-click-outside)="outsideClicked()" [allowed-clicked-classes]="classesList" [allowed-clicked-ids]="idsList">
    </div>

Component

 
@Component({
  // ...
})
export class AppComponent implements {
 
    classesList = ['class1', 'class2', 'class3'];
    idsList = ['id1', 'id2', 'id3'];
 
 
    constructor() {}
 
    outsideClicked() {
      // ...
    }
}

Package Sidebar

Install

npm i ngx-yazuo-click-outside

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

50.6 kB

Total Files

19

Last publish

Collaborators

  • maicon.funke
  • richard.lnnr