Skip to content

Commit 9ec3f4a

Browse files
Change context property to any type
Returning a value of ValidationErrors gives usage errors in the view. By changing this to 'any', those errors no longer occur.
1 parent 3724115 commit 9ec3f4a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

angular-reactive-validation/src/validation-message/validation-message.component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ export class ValidationMessageComponent {
4545
* The ValidationErrors object that contains contextual information about the error, which can be used for
4646
* displaying, e.g. the minimum length within the error message.
4747
*/
48-
set context(errors: ValidationErrors) {
49-
this._context = errors;
50-
}
51-
get context() {
48+
get context(): any {
5249
return this._context;
5350
}
5451

@@ -57,10 +54,10 @@ export class ValidationMessageComponent {
5754
}
5855

5956
show(error: ValidationError) {
60-
this.context = error.errorObject;
57+
this._context = error.errorObject;
6158
}
6259

6360
reset() {
64-
this.context = undefined;
61+
this._context = undefined;
6562
}
6663
}

0 commit comments

Comments
 (0)