Hierarchy

  • UrlHelper

Methods

  • Searches for a parameter in a querystring.

    Parameters

    • param: string

      Parameter to search for.

    • url: string

      Querystring to search in (defaut is window.location).

    Returns boolean

  • Removes parameter from a querystring.

    Parameters

    • param: string

      Querystring parameter.

    • queryString: string

      Querystring to search in (defaut is window.location).

    Returns string | boolean

  • Removes parameter from an URL.

    Parameters

    • param: string
    • url: string

    Returns string

  • Get base URL.

    Parameters

    • Optional path: string

      Path e.g. folder/file.vm.

    Returns string

  • Get value of a URL querystring parameter.

    Parameters

    • param: string

      Querystring parameter.

    • Optional queryString: string

      Querystring to search in (defaut is window.location).

    Returns undefined | string

  • Get URL querystring parameters or false if none found.

    Parameters

    • queryString: string

      Querystring to search in (defaut is window.location).

    Returns false | StringMap

  • Get URL querystring parameters as string.

    Parameters

    • queryString: string

      Querystring to search in (defaut is window.location).

    Returns string

  • Check if the URLs pathname attribute is set.

    Parameters

    • url: string | URL

    Returns boolean

  • Merges two querystrings.

    Parameters

    • string1: string
    • string2: string

    Returns string

  • Sets a specified querystring parameter with a given value to an URL-string that has to be passed to the URL.

    Parameters

    • param: string

      Querystring parameter to change. Add parameter if not existing already.

    • value: string

      The value for the (new) parameter.

    • queryString: string

      Complete URI or parameter component part of an URI.

    • Optional noHexEnc: boolean

      Disable hex encoding.

    • noUrlCheck: boolean = false

      Separate parameter component part from the given URI.

    Returns string | false

    Parameter component part without question mark.