# Interface ViewConfig

This interface represents a [[_ViewDeclaration]] that is bound to a [[PathNode]].

A `ViewConfig` is the runtime definition of a single view.

During a transition, `ViewConfig`s are created for each [[_ViewDeclaration]] defined on each "entering" [[StateObject]]. Then, the [[ViewService]] finds any matching `ui-view`(s) in the DOM, and supplies the ui-view with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`.

A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches the `uiViewName` address.

interface ViewConfig {
$id: number;
loaded: boolean;
path: PathNode[];
viewDecl: ViewDeclaration;
load(): Promise<ViewConfig>;
}

- Defined in src/router/view/interface.ts:38

##### Index

### Properties

$id
loaded
path
viewDecl

### Methods

load

## Properties

### $id

$id: number

- Defined in src/router/view/interface.ts:40

### loaded

loaded: boolean

- Defined in src/router/view/interface.ts:47

### path

path: PathNode[]

The node the ViewConfig is bound to

- Defined in src/router/view/interface.ts:45

### viewDecl

viewDecl: ViewDeclaration

The normalized view declaration from [[State.views]]

- Defined in src/router/view/interface.ts:42

## Methods

### load

- load(): Promise<ViewConfig>

  Fetches templates, runs dynamic (controller|template)Provider code, lazy loads Components, etc

  #### Returns Promise<ViewConfig>

  - Defined in src/router/view/interface.ts:50