How can I solve this problem?
Based on this thread:
the solution is changing this { validator: NewValidators.passwordsShouldMatch });
{ validator: NewValidators.passwordsShouldMatch });
to this { validator: NewValidators.passwordsShouldMatch } as AbstractControlOptions);
{ validator: NewValidators.passwordsShouldMatch } as AbstractControlOptions);