I’ve create a new Router, and set the routes, now i want change dinamically the path of my router, in another web component. How can i get the current router?
You can use the RouteConfiguration class to register routes dynamically.
Example:
RouteConfiguration.forApplicationScope().setRoute("newRoute",
MainView.class);
The topic is covered in detail in the documentation: https://vaadin.com/docs/v14/flow/routing/tutorial-router-dynamic-routes.html