Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple (nested) router instances #199

Open
vlukashov opened this issue Jun 26, 2018 · 3 comments
Open

Multiple (nested) router instances #199

vlukashov opened this issue Jun 26, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@vlukashov
Copy link
Contributor

As a developer I want to create route components that handle their own routing independently from the other parts of the app so that there is no need for any kind of central coordination more than agreeing on URL prefixes for different components.

As a component developer I want to be able to use Vaadin.Router in my route component independently from any other routing solution(s) used in the other parts of the app.

The first use case is already addressed by #28 (by having a single Vaadin.Router instance and loading child route configs dynamically, per-component). The second use case requires special support for creating multiple instances of Vaadin.Router and ensuring that they work well together.

DoD:

  • the routes defined in a nested Vaadin.Router instance are rendered in the same resolve pass as root route component, i.e. the order of calling lifecycle callbacks is the same as if all routes were defined on the same router instance.
  • if a route in a nested VaadinRouter instance prevents a transition, the outer router also stops the resolve pass
  • if a route in an outer Vaadin.Router instance redirects navigation, the inner router would not even start with processing the navigation event.
  • there is a demo of using nested Vaadin.Router instances

The common DoD applies.

@gitawego
Copy link

gitawego commented Jun 4, 2020

It's a must have feature :)

We are building a webapp using vaadin router, and we don't want to use shadow dom because of the theming issue, but currently the nested components feature is based on slot, which makes it a dead end for us.

@vlukashov
Copy link
Contributor Author

Thanks for sharing the details behind why you need this. It sounds like adding support for light DOM parent layouts would also be an acceptable solution.

Using Vaadin Router without Shadow DOM is something several other users have requested here and there. Your comment adds another voice to that.

@joezappie
Copy link

joezappie commented Jun 14, 2021

Any further work on this? I too am looking for this exact same thing - ability for components to define their own routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants