src/app/core/config/dynamic-routing/view-config.interface.ts

Description

Object specifying a route and config of its view as stored in the config database

Extends

DynamicComponentConfig<T>

Relationships

Used by

No results matching.

Index

Properties

Properties

_id
_id: string
Type : string

config object id which equals the route path

lazyLoaded
lazyLoaded: boolean
Type : boolean
Optional

indicate that the route is lazy loaded.

At the moment that means the routing is set in the app.routing.ts and not loaded from the config. The ViewConfig of a lazy-loaded route is only used for additional flags like requiresAdmin.

component
component: string
Type : string
Optional

string id/name of the component to be displaying this view. The component id has to be registered in the component map.

(optional) if the ladyLoaded is true, this is not required (and will be ignored) This allows hard-coded lazy-loaded components to be dynamically extended with config or permissions.

config
config: T
Type : T
Optional

optional object providing any kind of config to be interpreted by the component for this view

permittedUserRoles
permittedUserRoles: string[]
Type : string[]
Optional

Allows to restrict the route to the given list of user roles. If set, the route can only be visited by users which have a role which is in the list. If not set, all logged-in users can visit the route.

import { DynamicComponentConfig } from "../dynamic-components/dynamic-component-config.interface";

/**
 * Object specifying a route and config of its view
 * as stored in the config database
 */
export interface ViewConfig<T = any> extends DynamicComponentConfig<T> {
  /** config object id which equals the route path */
  _id: string;

  /**
   * indicate that the route is lazy loaded.
   *
   * At the moment that means the routing is set in the app.routing.ts and not loaded from the config.
   * The ViewConfig of a lazy-loaded route is only used for additional flags like `requiresAdmin`.
   */
  lazyLoaded?: boolean;
}

/**
 * The prefix which is used to find the ViewConfig's in the config file
 */
export const PREFIX_VIEW_CONFIG = "view:";

results matching ""

    No results matching ""