More than one custom value accessor matches form control unspecified name attributes...

Discussão em 'Angular' iniciado por Mani Nalliappan, Outubro 24, 2024.

  1. More than one custom value accessor matches form control unspecified name attributes NG_VALUE_ACCESSOR

    I am created two directives for input fields one checkbox true or false instead of 0 or 1 . another directive option value I need number not string

    Directive1 :
    @Directive({selector: DI_1,
    providers: [
    {
    provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef(() => Directive1),
    multi: true
    }
    ]})


    Directive2 :
    @Directive({selector: DI_2,
    providers: [
    { provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef(() => Directive2),
    multi: true
    }
    ]})


    if I am removing onthe providers. it is working fine.I need both directive How to resolve on angular

    Continue reading...

Compartilhe esta Página