Karl Glaser
Karl Glaser

Reputation: 849

Two main outlets, each with routes handling dynamic segments

Is there a commonly accepted solution to a problem I'm currently facing?

Lets say you have an app that needs to have a set of quite normal routes, some with dynamic segments. But also another outlet in the app, lets say a sidebar for example, that can be opened from any one of the main apps routes. This sidebar also has its own routing structure, with some routes requiring dynamic segments too.

How could one implement routes for a sidebar that could be opened from any other normal route in the application?

Upvotes: 1

Views: 37

Answers (1)

user663031
user663031

Reputation:

Routes stand in a one-to-one relationship with URLs. There can only be one URL at a time (unless you're talking about iframes). You cannot have two separate active routes--what URL would show in the browser's location bar? What URL would App.currentURL show?

To handle your case, you're going to need logic to render various models into the outlet outside of the routing structure.

Upvotes: 2

Related Questions