UrlRouter | @uirouter/angular
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

Methods

  • deferIntercept(defer?: boolean): 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
  • rules(): UrlRule[]
  • sort(compareFn?: function): void
  • sync(evt?: any): void
  • update(read?: boolean): void
  • Internal API.

Generated using TypeDoc