@acomici/directives
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Acomici Common Directives

This repository includes most common Angular directives that are used in all other Acomici repositories. PR and issues are welcomed.

This project was generated with Angular CLI version 11.0.3.


Included Directives


acomiIsOutside

In your component's module.

@NgModule({
  imports: [
    ClickOutsideModule
  ],
})
export class SomeModule {
}

And use in HTML component

<div acomiIsOutside (isOutside)="isClickingOutside($event)" (outside)="whenOutside()">
  Some DOM
</div>
// your component.ts
/**
 * `isOutSide` will be true if user click outside the DOM.
 * and false when click inside the DOM (or any child DOM)
 * this is useful if you want to detect exactly when user click in or outside the DOM.
 */
isClickingOutside(isOutside: boolean) {
  // ...
}

/**
 * Use this if you only want to trigger when user click outside the DOM.
 */
whenOutside() {
  // ...
}

acomiCarousel

In your component's module.

@NgModule({
  imports: [
    CarouselModule
  ],
})
export class SomeModule {
}
  • Updating...

acomiOverCounted

In your component's module.

@NgModule({
  imports: [
    OverCountedModule
  ],
})
export class SomeModule {
}
  • Updating...

Future document improvement:

Document for each directive will be constructed as some directive have lots of options (acomiCarousel).

Readme

Keywords

none

Package Sidebar

Install

npm i @acomici/directives

Weekly Downloads

4

Version

0.2.3

License

none

Unpacked Size

147 kB

Total Files

31

Last publish

Collaborators

  • namdien177
  • manhjin