I am using Angular 10 and have the following setInterval code working in my local:
ngOnInit() {
this.myfunc();
setInterval(this.myfunc.bind(this), 120000);
}
However, the same code is not working on the server.
In other words, myfunc() is not triggering after 2 mins when running on the server.
Debugging Details:
In my local, this.myfunc() is called when the component is loaded for the first time. It is called again after 2 mins as per the setInterval()
However, when running on the server, this.myfunc() is called when the component is loaded for the first time. But it is not called again after 2 mins as per the setInterval()