Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Latest commit

 

History

History
29 lines (18 loc) · 1.24 KB

tutorial-routing-on-client-side-and-server-side.asciidoc

File metadata and controls

29 lines (18 loc) · 1.24 KB
title order layout
Router for Both Client-side and Server-side
1
page

Introduction to Routing in Vaadin

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.

What is the @Route Annotation?

@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.

TypeScript routing

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.