Skip to content

@continuum-js/router


@continuum-js/router / RouteDef

Interface: RouteDef

Defined in: match.ts:12

Properties

children?

optional children?: RouteDef[]

Defined in: match.ts:21

Nested routes, rendered into the parent's <Outlet>.


component?

optional component?: Component

Defined in: match.ts:19

What to render. A layout without content may omit it (children render through).


guard?

optional guard?: (params) => string | true

Defined in: match.ts:26

Pure guard: return true to pass or a path to redirect to (applied with replace, so the guarded URL doesn't pollute history).

Parameters

params

Params

Returns

string | true


path

path: string

Defined in: match.ts:17

Path relative to the parent: "" (index), "users", ":id", "docs/api", or "*" (catch-all, rest available as params["*"]).