Write code that will check the server 15 second 15 second


#1

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


#2

You can use websockets


#3

Or you can try something like this with interval 15000:


#4

or you use javascript setInterval

interval:any;
...

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

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