I create an Angular app that search students from API. It works fine but it calls API every time an input value is changed. I\'ve done a research that I need something calle
For anyone coming across this in a newer version of angular (and rxjs).
The new Rxjs has pipeable operators and they can be used like this (from the accepted answers code)
ngOnInit() {
this.subscription = this.searchTextChanged.pipe(
debounceTime(1000),
distinctUntilChanged(),
mergeMap(search => this.getValues())
).subscribe((res) => {
console.log(res);
});