K
K
Konstantin2020-07-14 12:39:16
Angular
Konstantin, 2020-07-14 12:39:16

How to change the values ​​of options for ControlValueAccessor from the outside?

I have a custom form control of the type select list:

export class BadgeFormControlComponent implements ControlValueAccessor {
}


Usage:

<app-badge-form-control [options]="selectedReglaments"   formControlName="reglamentid"></app-badge-form-control>


How to update the values ​​of options from the outside through the formGroup.control() itself: Of

[options]="selectedReglaments"

course, you can update the reference to the incoming selectedReglaments

[options]="selectedReglaments" variable - but you don’t want to create an extra selectedReglaments variable in the external component

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question