I use the observed interval to perform a specific function every fifth second inside a specific component associated with the path in my route configuration.
Observable.interval(5000).subscribe(res => {
However, I want to end the interval when the path changes. Now he just continues the task ...
What is the best way to do this?
angular typescript observable
Valdemar Edvard Sandal Rolfsen
source share