UrlRouter | @uirouter/core
Options
Menu

Class UrlRouter

Updates URL and responds to URL changes

Deprecation warning:

This class is now considered to be an internal API Use the UrlService instead. For configuring URL rules, use the UrlRules which can be found as UrlService.rules.

Hierarchy

  • UrlRouter

Index

Properties

urlRuleFactory: UrlRuleFactory

used to create UrlRule objects for common cases

used to create UrlRule objects for common cases

Accessors

  • get interceptDeferred(): boolean
  • deprecated

    use [[UrlService.interceptDeferred]]

    Returns boolean


Methods

  • deferIntercept(defer?: boolean): void
  • Parameters

    • defer: Optional  boolean

    Returns void


  • href(urlMatcher: UrlMatcher, params?: any, options?: object): string
  • Builds and returns a URL with interpolated parameters

  • Builds and returns a URL with interpolated parameters

    Example:

    matcher = $umf.compile("/about/:person");
    params = { person: "bob" };
    $bob = $urlRouter.href(matcher, params);
    // $bob == "/about/bob";

    Parameters

    • urlMatcher UrlMatcher
      :

      The UrlMatcher object which is used as the template of the URL to generate.

    • params: Optional  any
      :

      An object of parameter values to fill the matcher's required parameters.

    • options: Optional  object
      :

      Options object. The options are:

      • absolute: boolean

    Returns string

    :

    Returns the fully compiled URL, or null if params fail validation against urlMatcher


  • listen(enabled?: boolean): Function
  • Parameters

    • enabled: Optional  boolean

    Returns Function


  • Internal API.

    Pushes a new location to the browser history.

    Parameters

    • urlMatcher UrlMatcher
      :
    • params: Optional  RawParams
      :
    • options: Optional  object
      :
      • Optional replace?: string | boolean

    Returns void


  • Parameters

    Returns void


  • Parameters

    Returns Function


  • rules(): UrlRule[]
  • Returns UrlRule[]


  • sort(compareFn?: function): void
  • Parameters

    Returns void


  • sync(evt?: any): void
  • Parameters

    • evt: Optional  any

    Returns void


  • update(read?: boolean): void
  • Internal API.

  • Internal API.

    Parameters

    • read: Optional  boolean

    Returns void


  • Parameters

    Returns UrlRule


Generated using TypeDoc