I\'m developing a website in Angular 2 using Typescript and I was wondering if there was a way to implement thread.sleep(ms) functionality.
thread.sleep(ms)
My use case
This works: (thanks to the comments)
setTimeout(() => { this.router.navigate(['/']); }, 5000);