Skip to content

Commit

Permalink
chore: improve code documentation (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel Schmidt <ms@manuel-schmidt.at>
  • Loading branch information
Kr0san89 and Manuel Schmidt authored Apr 12, 2024
1 parent 5b0ca21 commit ec2cbcb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {booleanAttribute, Directive, effect, input, OnDestroy} from '@angular/core';
import {NgClickOutsideDirective} from "./ng-click-outside.directive";

/**
* Directive only starts after a single click and the outside click event handler
* will then be removed after a click outside has occurred.
*/
@Directive({
selector: '[clickOutside][attachOutsideOnClick]',
standalone: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {booleanAttribute, Directive, input} from '@angular/core';
import {NgClickOutsideDirective} from "./ng-click-outside.directive";

/**
* Click oustside Directive but with an setTimeout on the listener
* This may help for items that are conditionally shown ([see issue #13](https://github.com/arkon/ng-click-outside/issues/13)).
*/
@Directive({
selector: '[clickOutside][delayClickOutsideInit]',
standalone: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export abstract class NgClickOutsideExcludeToken {
abstract isExclude(target: any): boolean;
}

/**
* Directive to exclude elements from the click-outside
*/
@Directive({
selector: '[clickOutsideExclude]',
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {NgClickOutsideExcludeToken} from "./ng-click-outside-exclude.directive";
import {arrayAttribute} from "./array-attribute";

/**
* Directove to detect clicks outside of the current element
* Directive to detect clicks outside of the current element
*
* ```typescript
* @Component({
Expand Down

0 comments on commit ec2cbcb

Please sign in to comment.