Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Not sure If I am correct, I also find it hard to understand on how to correctly implements custom value accessor. #1956

@bll55020674

Description

@bll55020674

Not sure If I am correct, I also find it hard to understand on how to correctly implements custom value accessor.

Did you try to bind NgControl to you ValueAccessor ?

final NgControl ngControl;

ContentEditableDirective(this._element, @Self() @Optional() this.ngControl) {
   ngControl?.valueAccessor = this;
}

void ngOnDestroy() {
  ngControl?.valueAccessor = null;
}

The other possible solution would be to inject you value accessor like it's done for DefaultValueAccessor

Originally posted by @lejard-h in #1941 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions