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.
This commit is contained in:
David Stellini 2019-10-10 16:19:47 +03:00 committed by GitHub
parent cf490022b4
commit 68a6a1b4ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());