Write code that will check the server 15 second 15 second

Hello I would like to write a code to update my page every 15 seconds

You can use websockets

Or you can try something like this with interval 15000:

1 Like

or you use javascript setInterval

interval:any;
...

clearInterval(){
      clearInterval(this.interval);
}

startInterval(){
      this.interval = setInterval(() => {
           this.zone.run(() => {
                  //your Stuff here
            });
       }, 15000);
}
1 Like