how to stop refreshing page in angular code example Example: how to refresh page angular refresh(): void { window.location.reload(); }