ui-router-server / url-config / RouterUrlConfig
Interface: RouterUrlConfig
Defined in: url-config.ts:31
The url options every @uirouter/core router takes through urlService.config, and every mount takes through `MountConfig.config`. An option left undefined keeps core's default: strict, case-sensitive, no squash.
Extends
Pick<UrlMatcherCompileConfig,"strict"|"caseInsensitive">
Properties
| Property | Type | Description | Defined 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. | url-config.ts:36 |
trailingSlash? | TrailingSlashPolicy | Which 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; | url-config.ts:57 |