How do I know when custom form control is marked as pristine in Angular?

Discussão em 'Angular' iniciado por Slava Fomin II, Fevereiro 28, 2025.

  1. I have several custom form control components in my Angular application, which implement ControlValueAccessor interface and it works great.

    However, when markAsPristine() is called on parent form, or on my custom control directly I need to update it's state: my custom control is actually have internal control and I need to call markAsPristine() on it too.

    SO, how do I know when markAsPristine() is called on my control?

    The ControlValueAccessor interface has no members, related to this problem, which I can implement.

    Continue reading...

Compartilhe esta Página