I am designing a dashboard based on angular 6
. My dashboard has several different components arranged together. I want to refresh a component after every 5 minutes.
I have tried windows.location.reload()
and location.reload()
however it is refreshing the entire page and not just one component , i.e. to be specefic all my components are getting refreshed. So, please help and thanks in advance.
Try this out
constructor(private ref: ChangeDetectorRef) {
setInterval(() => {
this.ref.detectChanges();
}, 5000);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With