Skip to content

ui-router-server / redirects / RouteTableConfig

Interface: RouteTableConfig ​

Defined in: redirects.ts:27

A route table's url options: the matcher compiler's, plus the `trailingSlash` policy, which reads each state's kind.

Extends ​

Properties ​

PropertyTypeDescriptionInherited fromDefined in
defaultSquashPolicy?NonNullable<string | boolean | undefined>Squash policy for defaulted params that don't declare one (default false); value type pinned to core's UrlConfig.defaultSquashPolicy.UrlMatcherCompilerConfig.defaultSquashPolicyurl-config.ts:36
trailingSlash?TrailingSlashPolicyWhich spelling of a trailing slash is canonical, per kind of state; needs strict: false, so both spellings match first. A server mount answers the other spelling with a 308 redirect to the canonical one, and a router this config is applied to formats href() and the urls it pushes in the canonical spelling. Example import type { RouterUrlConfig } from 'ui-router-server/url-config'; // pages at /releases/pkg/, response states at the url they were asked for export const urlConfig = { strict: false, trailingSlash: { pages: 'always' }, } satisfies RouterUrlConfig;RouterUrlConfig.trailingSlashurl-config.ts:57