why angular 17 ssr setInterval not working

49 Views Asked by At

when i use setInterval or setTimeOut my app dont run and cant get build ? how i can solve this problem.

startAutoIncrement() 
this.intervalId = setInterval(() => {
  this.increment();`your text`
}, 1000);
1

There are 1 best solutions below

0
Matthieu Riegler On

When you use setInterval you app stay in an unstable state.

When you use SSR, the generated HTML is only sent to the client once the app become stable for the first time.