SchweizerischeBundesbahnen / scion-workbench

SCION Workbench enables the creation of Angular web applications that require a flexible layout to arrange content side-by-side or stacked, all personalizable by the user via drag & drop.
Eclipse Public License 2.0
77 stars 10 forks source link

Support for view routes which are children of the "empty path" top-level route #487

Closed danielwiehl closed 3 months ago

danielwiehl commented 11 months ago

Is your feature request related to a problem? Please describe.

The SCION Workbench supports navigation to any top-level primary route that has a non-empty path. Thus, a view route cannot be a child of a top-level empty-path route, which would be useful for declaring guards in a single place.

  {
    path: '',
    canActivate: [authorizedGuard()],
    children: [
      {
        path: 'view-1',
        loadComponent: () => import('./view/view-1.component'),
      },
      {
        path: 'view-2',
        loadComponent: () => import('./view/view-2.component'),
      },
    ]
  },

Describe the solution you'd like

Support view routes that are children of the empty-path top-level route.