From c5ad1d605c1a9be10f3feda6986b4d839e097dce Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Sat, 24 Sep 2016 19:26:25 +0100 Subject: [PATCH] fix(aot): remove private from methods used in templates --- src/confirm.directive.ts | 55 +++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/confirm.directive.ts b/src/confirm.directive.ts index dc44531..3a29e97 100644 --- a/src/confirm.directive.ts +++ b/src/confirm.directive.ts @@ -217,6 +217,38 @@ export class Confirm implements OnDestroy, OnChanges, OnInit { this.hidePopover(); } + /** + * @private + */ + @HostListener('document:click', ['$event.target']) + @HostListener('document:touchend', ['$event.target']) + onDocumentClick(target: HTMLElement): void { + + if (this.popover && !this.elm.nativeElement.contains(target) && !this.popover.location.nativeElement.contains(target)) { + this.hidePopover(); + } + } + + /** + * @private + */ + @HostListener('click') + togglePopover(): void { + if (!this.popover) { + this.showPopover(); + } else { + this.hidePopover(); + } + } + + /** + * @private + */ + @HostListener('window:resize') + onResize(): void { + this.positionPopover(); + } + private showPopover(): void { if (!this.popover && !this.isDisabled) { @@ -292,27 +324,4 @@ export class Confirm implements OnDestroy, OnChanges, OnInit { } } - @HostListener('document:click', ['$event.target']) - @HostListener('document:touchend', ['$event.target']) - private onDocumentClick(target: HTMLElement): void { - - if (this.popover && !this.elm.nativeElement.contains(target) && !this.popover.location.nativeElement.contains(target)) { - this.hidePopover(); - } - } - - @HostListener('click') - private togglePopover(): void { - if (!this.popover) { - this.showPopover(); - } else { - this.hidePopover(); - } - } - - @HostListener('window:resize') - private onResize(): void { - this.positionPopover(); - } - }