I want to implement a custom ErrorStateMatcher to show errors even when the formControl is not toched for a matInput from a 3rd party library.
I have implemented an ErrorStateMatcher
to do this job, but when I provide it on a component level, it does not work.
In the example above, it only works when providing it on a module level (one can uncomment the providers in the app.module.ts
)
Note: Manually creating an instance of the ErrorStateMatcher
and passing it to the matInput
is not possible to me, since I don't have access to the template where the matInput belongs.