Routing with nested frames

The diagram below shows an example, where there is a main home frame, and nested inside that there are two sub-frames, called frame-a and frame-b.

For the examples, we can have three possible router links:

  • /home/: Shows the home frame with frame A in the RouterOutlet. (So frame A is assumed to be the default.)
  • /home/frame-a: Shows the home frame with frame A in the RouterOutlet.
  • /home/frame-b: Shows the home frame with frame B in the RouterOutlet.


Below is the configuration file for this example.

kind: Solution
version: v0
  kind: Router
    - frame: home # routerLink /home
        - frame: frame-a # routerLink /home/frame-a
        - frame: frame-b # routerLink /home/frame-b
  # ====== HOME FRAME ======
    kind: Frame
      kind: ColumnLayout
      widths: [auto, 300px]
      areas: [nav, main]
        kind: NavPanel
        orientation: vertical
        type: button
        card: true
          - kind: NavButton
            text: Go to frame A
            frame: frame-a
          - kind: NavButton
            text: Go to frame B
            frame: frame-b
          - kind: RouterOutlet
            frame: home
            source: main-outlet
        kind: RouterOutlet
  # ====== FRAME A ======
    kind: Frame
  # ====== FRAME B ======
    kind: Frame

Router Outlet

For the routes configuration, if a frame has child frames, then those child frames will be automatically inserted into any RouterOutlet in that frame. Note that each frame should only contain a single RouterOutlet. (If you create multiple outlets, then the same content will be repeated multiple times, which is probably not what you want.) If you need to have multiple outlets, then you need to nest them inside one another.

In the example, we can see the following:

  • In router>routes, the home frame route has two child routes, for frames A and B.
  • In frames>home>contents, the home frame has a RouterOutlet.
  • So frames A and B will be inserted into that RouterOutlet in the home frame.

In the diagram below, we have highlighted the way that the routes relate to frames.

Default Frame

When a user enters the home URL:, then the first frames will be loaded by default. So in this case, it will be home and frame-a.

For navigation, the NavPanel has a dictionary of items which are displayed as a set of buttons in the user interface. Each NavButton has a frame that will be shown in the outlet when the button is clicked. Below is the code-snippet of a NavButton:

kind: NavButton
text: Go to frame A
frame: frame-a

If the NavPanel subscribes to the RouterOutlet, then the navigation items will automatically highlight the currently active frames.