Viewports
Aurelia supports named viewports, allowing you to define multiple <router-view>
elements in your template. This is particularly useful for complex layouts where you want to load different components into different areas of the page.
In your template:
Then in your route configuration:
You can also set defaults for viewports:
This will load the 'common/rightPanel' module into the 'right' viewport for any route that doesn't explicitly specify a different module for that viewport.
Last updated
Was this helpful?