Search code examples
vaadinlit-element

Change page in vaadin router litElement project


how can I change the current page without reloading by pressing a button, something like history.push in react. Is there an analogue in vaadin router?


Solution

  • In most cases, you want to navigate with normal <a href=""> links. Vaadin Router will intercept those and update the page content without a reload.

    You can also navigate programmatically with Router.go('path').