Skip to content

lit-ui-router / LitViewConfig

Class: LitViewConfig ​

Defined in: packages/lit-ui-router/src/core.ts:43

The view config UIRouterLit builds for each lit view declaration, implementing @uirouter/core's ViewConfig.

<ui-view> renders a view only when its config is a LitViewConfig; a renderer that draws lit views outside <ui-view> makes the same instanceof check before it reads viewDecl.

Implements ​

  • ViewConfig

Constructors ​

Constructor ​

ts
new LitViewConfig(path, viewDecl): LitViewConfig;

Defined in: packages/lit-ui-router/src/core.ts:54

Create a new LitViewConfig.

Parameters ​

ParameterTypeDescription
pathPathNode[]The path nodes for this view
viewDecl_ViewDeclarationThe view declaration

Returns ​

LitViewConfig

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
$idpublicnumber...Unique identifier for this view configpackages/lit-ui-router/src/core.ts:45
loadedpublicbooleantrueWhether the view configuration has been loadedpackages/lit-ui-router/src/core.ts:47
pathpublicPathNode[]undefinedThe path nodes for this viewpackages/lit-ui-router/src/core.ts:55
viewDeclpublic_ViewDeclarationundefinedThe view declarationpackages/lit-ui-router/src/core.ts:56

Methods ​

load() ​

ts
load(): Promise<LitViewConfig>;

Defined in: packages/lit-ui-router/src/core.ts:63

Load the view configuration.

Returns ​

Promise<LitViewConfig>

A promise that resolves to this view config

Implementation of ​

ViewConfig.load