i want when use input data after 300 millisecond emit
data for doing this i using the debouceTime :
subject: Subject<any> = new Subject();
constructor(private formBuilder: FormBuilder) { }
ngOnInit();
sendValue(): void {
this.subject.pipe(debounceTime(300))
.subscribe(() => {
this.formValue.emit(this.dynamicForm.value);
})
}
and this is html :
<input
(change)="sendValue()"
required
[formControlName]="controls.controlName"
matInput
/>
but it not execute subscribe after 300 millisecond .
whats the problem ? how can i solve this problem ???