I have a Vaadin 20 application that is Flow-based. All views are written in Java, and the routes are set up with Java. I wanted to have a nicer navigation component, so I created a frontend TS template for my project, as frontend/src/vaadin-nav.ts
. It has a bunch of <a>
elements for navigation purposes.
My question is, how should I link to the server-side routes correctly from the template? I have e.g. AboutView.java
with @Route(value = "about", layout = MainView.class)
. How can I tell in the template that "navigate to 'about'"? I tried checking the Router instructions for Fusion, but they require that I have set up a client-side router object with an outlet. I don't want to do that because I already have a MainView.java
that sets up the routing and outlet.