I'm new to Angular and I have a selection that on its option selection I want to change the route
now I want to change the route exactly after selecting one of the options, not by pressing entr after selection! any body can help?
<input type="text" name="" value="" class="form-control" matInput [formControl]="searchControl" [matAutocomplete]="auto" (change)="searchComponent($event)">
<button class="search-btn"><fa-icon icon="search" class="fa-icon"></fa-icon></button>
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" class="animated fadeIn">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option.name">
<a routerLink="/{{option.url}}">
{{option.name}}
{{option.id}}
</a>
</mat-option>
</mat-autocomplete>
as you see I have used (change) to get the value and I do! but after selecting the option the value is displayed in the input and it works after pressing enter! but I want it to work without enter.