From 98f4d7c7e307fafda0b38005c4fa26c3cb1aebb7 Mon Sep 17 00:00:00 2001 From: Giovane Souza Date: Tue, 19 Sep 2017 22:40:35 -0300 Subject: [PATCH 1/3] change subject.unsubscribe() to subject.complete() --- .gitignore | 3 +++ src/ngxerror.directive.ts | 3 ++- src/ngxerrors.directive.ts | 12 ++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1cb2771..39d9281 100755 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ dist # Docs gh-pages + +# VScode stop adding .angulardoc.json +.angulardoc.json diff --git a/src/ngxerror.directive.ts b/src/ngxerror.directive.ts index 6b5ae7d..ad2e631 100755 --- a/src/ngxerror.directive.ts +++ b/src/ngxerror.directive.ts @@ -70,7 +70,8 @@ export class NgxErrorDirective implements OnInit, OnDestroy, DoCheck { } ngOnDestroy() { + this._states.complete(); this.subscription.unsubscribe(); } -} \ No newline at end of file +} diff --git a/src/ngxerrors.directive.ts b/src/ngxerrors.directive.ts index e0b74da..68fe741 100755 --- a/src/ngxerrors.directive.ts +++ b/src/ngxerrors.directive.ts @@ -16,7 +16,7 @@ export class NgxErrorsDirective implements OnChanges, OnDestroy, AfterViewInit { @Input('ngxErrors') controlName: string; - subject = new BehaviorSubject(null); + subject: BehaviorSubject; control: AbstractControl; @@ -71,10 +71,14 @@ export class NgxErrorsDirective implements OnChanges, OnDestroy, AfterViewInit { } } + ngOnInit() { + this.subject = new BehaviorSubject(null); + } + ngOnChanges() { this.control = this.form.control.get(this.controlName); } - + ngAfterViewInit() { setTimeout(() => { this.checkStatus(); @@ -83,7 +87,7 @@ export class NgxErrorsDirective implements OnChanges, OnDestroy, AfterViewInit { } ngOnDestroy() { - this.subject.unsubscribe(); + this.subject.complete(); } -} \ No newline at end of file +} From a52516832091696b11dfb971bf84da90fd1030b1 Mon Sep 17 00:00:00 2001 From: Giovane Souza Date: Mon, 16 Oct 2017 22:59:46 -0200 Subject: [PATCH 2/3] Changed version to 0.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5e833d..0de8ba2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ultimate/ngxerrors", - "version": "0.0.0", + "version": "0.0.1", "description": "A declarative validation module for reactive forms", "author": "Ultimate Angular", "license": "MIT", From b945a9bf966b9b19721485d8aaa23b73d587f19f Mon Sep 17 00:00:00 2001 From: Giovane Souza Date: Mon, 16 Oct 2017 23:03:18 -0200 Subject: [PATCH 3/3] Back to version 0.0.0 for publishing auto increment version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0de8ba2..b5e833d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ultimate/ngxerrors", - "version": "0.0.1", + "version": "0.0.0", "description": "A declarative validation module for reactive forms", "author": "Ultimate Angular", "license": "MIT",