Menu Close

How to reload current page with Angular?

Sometimes, we want to reload current page with Angular.

In this article, we’ll look at how to reload current page with Angular.

How to reload current page with Angular?

To reload current page with Angular, we call navigateByUrl and navigate.

For instance, we write

await this.router.navigateByUrl("", { skipLocationChange: true });
this.router.navigate(["/launchpad"]);

to call navigateByUrl and navigate to reload the /launchpad page.

this.router is a Router instance.

Conclusion

To reload current page with Angular, we call navigateByUrl and navigate.

Posted in Angular, Angular Answers