I have a select inside a custom component that loads a lot of options from database and I bind options like this:
<select [id]="id" class="form-control" [formControlName]="id">
<option *ngFor="let p of items | async" [value]="codeKey">
{{ p[labelField] }}
</option>
</select>
In parent component ngOnInit I'm loading the entity from database and I need to bind the id with an option inside the select. The binding fails if the select inside (child) custom component takes too much time to load his options.
Is there a method to bind the id only when the custom component has loaded his data?