I have a textbox which has autocomplete enabled. Now, I want to retrieve selected option in the textbox from autocomplete suggestions and push it into another textbox. How can I code it in typescript? Is there any method for it?
Below is code for textbox having autocomplete suggestions :
<div class="form-group">
<label>Primary Contact</label>
<input type="text" placeholder="Enter" matInput [formControl]="myControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let option of options" [value]="option">{{option}}</mat-option>
</mat-autocomplete>
</input>
</div>