mat autocomplete async code example
Example: mat autocomplete async
this.usersForm = this.fb.group({
userInput: null
})
this.filteredUsers = this.usersForm
.get('userInput')
.valueChanges
.pipe(
debounceTime(300),
switchMap(value => this.appService.search({name: value}, 1))
);
{{ user.name }}
| ID: {{user.id}}