Am working in angular app, where used the valueChanges method to detect the changes. like :
this.MyFrm.controls['is_applicable'].valueChanges.subscribe(values => {
this.mainFunc()
});
But it trigger this function twice, To solve this, I have used debounceTime. like :
this.MyFrm.controls['is_applicable'].valueChanges.pipe(debounceTime(0),distinctUntilChanged(),takeUntil(this.destroy$)).subscribe(values => {
this.mainFunc()
});
But now problem is occur that valueChanges trigger after some time, that break my code flow.
Any Suggestion?