Here is the property and method
private errorMessages = new Map string>();
public get errors(): Array {
if (!this.control) {
return [];
}
const { errors } = this.control;
return Object.keys(errors).map(key => this.errorMessages.has(key) ?
this.errorMessages.get(key)() : errors[key] || key);
}
I get this error on this on this part of the code
this.errorMessages.get(key)()
Can someone explain why the problem as to why I'm getting this error and a possible solution to the problem?
Bohdan StupakPosted Nov 13, 2021, 3:10 PM