Trying to get names as ng-typeahead suggestions and tried below code but unable to get the autosuggestions. Here is my code.
fnPopulateEntity1Lovs() {
this.http
.get("https://reqres.in/api/products/", {})
.subscribe((res) => {
this.testData = res;
});
}
search: OperatorFunction < string, readonly string[] > = (text$: Observable < string > ) =>
text$.pipe(
debounceTime(200),
distinctUntilChanged(),
map(term => term.length < 2 ? [] :
this.testData.filter(v => v.toLowerCase().indexOf(term.toLowerCase()) > -1).slice(0, 10))
)
Demo: StackBlitz
Could you please suggest me how to get the typeahead options?