### Hierarchy

- UrlMatcherConfig
  - UrlConfigApi

### Implemented by

- UrlMatcherFactory

## Index

### Methods

- caseInsensitive
- defaultSquashPolicy
- strictMode
- type

## Methods

- caseInsensitive(value?: boolean): boolean

- Defines whether URL matching should be case sensitive (the default behavior), or not.

- Defines whether URL matching should be case sensitive (the default behavior), or not.

  #### Example:

      // Allow case insensitive url matches
      urlService.config.caseInsensitive(true);

  #### Parameters

  - ##### value: Optional boolean

    :

    `false` to match URL in a case sensitive manner; otherwise `true`;

  #### Returns boolean

  :

  the current value of caseInsensitive

  - Defined in url/interface.ts:61

- defaultSquashPolicy(value?: string | true | false): string | true | false

- Sets the default behavior when generating or matching URLs with default parameter values.

- Sets the default behavior when generating or matching URLs with default parameter values.

  #### Example:

      // Remove default parameter values from the url
      urlService.config.defaultSquashPolicy(true);

  #### Parameters

  - ##### value: Optional string | true | false

    :

    A string that defines the default parameter URL squashing behavior.

    - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL
    - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the parameter is surrounded by slashes, squash (remove) one slash from the URL
    - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) the parameter value from the URL and replace it with this string.

  #### Returns string | true | false

  :

  the current value of defaultSquashPolicy

  - Defined in url/interface.ts:94

- strictMode(value?: boolean): boolean

- Defines whether URLs should match trailing slashes, or not (the default behavior).

- Defines whether URLs should match trailing slashes, or not (the default behavior).

  #### Example:

      // Allow optional trailing slashes
      urlService.config.strictMode(false);

  #### Parameters

  - ##### value: Optional boolean

    :

    `false` to match trailing slashes in URLs, otherwise `true`.

  #### Returns boolean

  :

  the current value of strictMode

  - Defined in url/interface.ts:75

- type(name: string, type?: ParamTypeDefinition): ParamType

- Creates and registers a custom ParamTypeDefinition object

- Creates and registers a custom ParamTypeDefinition object

  A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.

  #### Note: Register custom types before using them in a state definition.

  #### Example:

      // Encode object parameter as JSON string
      urlService.config.type('myjson', {
        encode: (obj) => JSON.stringify(obj),
        decode: (str) => JSON.parse(str),
        is: (val) => typeof(val) === 'object',
        pattern: /[^/]+/,
        equals: (a, b) => _.isEqual(a, b),
      });

  #### Parameters

  - ##### name string

    :

    The type name.

  - ##### type: Optional ParamTypeDefinition

    :

    The type definition. See ParamTypeDefinition for examples and information.

  #### Returns ParamType

  :

  if only the `name` parameter was specified: the currently registered ParamType object, or undefined

  - Defined in url/interface.ts:120

Generated using TypeDoc