0
각도 4 프로젝트에는 언제든지 다른 함수 (A()
및 B()
)에 의해 호출 될 수있는 함수 (reload()
)가 있습니다. 나는 A()
또는 B()
의 마지막 호출에서 X 시간 (즉, msecs)이 경과 할 때까지 reload()
의 실행을 취소하고 싶습니다. Rx.Observable.debounce
과 Rx.Observable.debounceTime
함수를 살펴 보았습니다.하지만 실제로 도움이되는지 아닌지 이해하지 못했습니다.각도 및 관측 가능한 디버그 시간
예 :
time 0ms: A() gets executed and it calls reload()
time 200ms: B() calls executed and it calls reload()
Since X is set to 500ms, reload() should be called only once and after 500ms.
'throttleTime'을 (를) 찾고 계십니까? – martin
@msanford 예제를 제공해 주시겠습니까? –