title | order | layout |
---|---|---|
Router for Both Client-side and Server-side |
1 |
page |
Vaadin applications can be developed with server-side only views, client-side only views, or both at the same time. Therefore Vaadin provides 2 types of routing:
The first one is Java `@Route` annotation and the other one is TypeScript routing.
@Route
annotaion is used to navigate between server-side views in an application.
When you want to define any Java component as a route target for a URL fragment, let’s use it.
We will guide how to use @Route
annotation in the next chapter
and describe other things related to @Route
annotation in this section.
If you are looking for a way to combine client and server views in an application, you are in the right place.
TypeScript routing (@vaadin/router
) allows adding client-side routes, and using them separately or together with server-side routes defined with the @Route
annotation. You can also use it without server-side views.
We will explain more about @vaadin/router
how to use it and how it works in the Creating UI in TypeScript section.