From 68a6a1b4ec95ebb822d2459e1f15f661a27710dd Mon Sep 17 00:00:00 2001 From: David Stellini Date: Thu, 10 Oct 2019 16:19:47 +0300 Subject: [PATCH] Fix AOT issue This library breaks when running the production build on Angular 8 using AOT, as per https://github.com/DesertFoxNV/ngx-autosize-input/blob/master/projects/ngx-autosize-input/src/lib/auto-size-input.directive.ts This is the error: `Ng2FittextDirective, Expected 0 arguments, but got 1.` This MR fixes this issue. --- src/directives/ng2-fittext.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/directives/ng2-fittext.directive.ts b/src/directives/ng2-fittext.directive.ts index 81e0b60..4b52c2b 100644 --- a/src/directives/ng2-fittext.directive.ts +++ b/src/directives/ng2-fittext.directive.ts @@ -57,7 +57,7 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af } @HostListener('window:resize', ['$event']) - onResize() { + onResize(event: Event) { this.done = false; if (this.activateOnResize && this.fittext) { if (this.activateOnInputEvents && this.fittext) { @@ -71,7 +71,7 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af } @HostListener('input', ['$event']) - onInputEvents() { + onInputEvents(event: Event) { this.done = false; if (this.activateOnInputEvents && this.fittext) { this.setFontSize(this.getStartFontSizeFromHeight()); -- 2.49.1