[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/core](../../README) / [index](../README) / ViewRegistration

# Interface: ViewRegistration

Defined in: [router/Router.ts:267](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/router/Router.ts#L267)

Returned by Router.view — chain `.name()` and `.withLayout()` to configure the view route.

## Methods

### name()

> **name**(`routeName`): `ViewRegistration`

Defined in: [router/Router.ts:269](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/router/Router.ts#L269)

Name this view route for URL generation via the [route](../functions/route) helper.

#### Parameters

##### routeName

`string`

#### Returns

`ViewRegistration`

***

### withLayout()

> **withLayout**(`layout`): `ViewRegistration`

Defined in: [router/Router.ts:271](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/router/Router.ts#L271)

Wrap the rendered component in a layout that receives it as `children`.

#### Parameters

##### layout

[`ViewLayout`](../type-aliases/ViewLayout)

#### Returns

`ViewRegistration`
