diff --git a/angular-reactive-validation/package.json b/angular-reactive-validation/package.json index 56be847..8fcd121 100644 --- a/angular-reactive-validation/package.json +++ b/angular-reactive-validation/package.json @@ -1,7 +1,7 @@ { "name": "angular-reactive-validation", "description": "Reactive Forms validation shouldn't require the developer to write lots of HTML to show validation messages. This library makes it easy.", - "version": "4.0.0", + "version": "4.0.1", "repository": { "type": "git", "url": "https://github.com/davidwalschots/angular-reactive-validation.git" diff --git a/angular-reactive-validation/src/validation-messages/validation-messages.component.ts b/angular-reactive-validation/src/validation-messages/validation-messages.component.ts index 6b359dd..05afc63 100644 --- a/angular-reactive-validation/src/validation-messages/validation-messages.component.ts +++ b/angular-reactive-validation/src/validation-messages/validation-messages.component.ts @@ -77,7 +77,7 @@ export class ValidationMessagesComponent implements AfterContentInit, OnDestroy, } ngAfterContentInit() { - this.messageComponents.changes.subscribe(this.validateChildren); + this.messageComponentsChangesSubscription.add(this.messageComponents.changes.subscribe(this.validateChildren)); this.validateChildren(); this._for.forEach(control => {