How to do communication between config component and widget component in Angular

I have created a config component in which I have form value which I am passing from widget config to widget component but when I click again on setting button it gets becomes blank again,
I have used ngModel in my component

Status-Label
<label class=“editable” [ngClass]=“{‘updated’: true}”>
<input class=“form-control” type=“text” formControlName=“inputField” [(ngModel)]=“config.input1”
autocomplete=“off”>



Select Measurement series


<select id=“selectExample” class=“form-control” formControlName=“input2” (change)=“onChange($event.target.value)”>
<option *ngFor=“let item of Series”>{{item}}

any suggestions on it

Hi,

so the “communication” between the widget config component and the widget view component works via a config object.
Attributes on this object are supposed to be set within the widget config component, they are stored in the database once it is saved and the widget view component will get this config object to display what it should according to the configuration.

The issue description that you have provided is not really clear to me…
The widget view component is getting the expected config object? And the widget config component is also getting the expected config object?
Storing changes is also reflected in the config object afterwards?

The only issue that you are having is, that the input is empty? But the config is still storing the correct value?
Do you have any errors in your browsers console?

To verify how your config object looks like, you can always place this:

<pre><code>{{ config | json }}</code></pre>

In your widget components (both config and view).