Vickie
Vickie

Reputation: 47

Is there any default autocomplete option in Angular?

I tried to use autocomplete in Angular. Searched Stack Overflow and found few packages. When I try to use those package, I face few errors. So Instead of using a package, is there any default autocomplete feature in Angular without using Angular Materials? Here I have used select option for testing. Need to move the same options to autocomplete

Here what I have tried

<select class="form-control" name="seg_id" (change)="changeShape($event.target)"> <option *ngFor="let seg of segment" [value]="seg"> {{seg}} </option> </select>

Upvotes: 1

Views: 335

Answers (2)

Adrita Sharma
Adrita Sharma

Reputation: 22213

You can use Typeahead

Follow this link

Upvotes: 1

Abhilash Rathod
Abhilash Rathod

Reputation: 593

This is achievable using creating your own auto-complete component

Ref here This is just an example although you need to change few things in order to get your desired functionality. But, you will get some idea out of it.

Hope it helps.

Upvotes: 0

Related Questions