UrlRouter | @uirouter/angular
Options
All
  • Public
  • Public/Protected
  • All
Menu

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: UrlRuleFactory

used to create UrlRule objects for common cases

Accessors

interceptDeferred

  • get interceptDeferred(): boolean
  • deprecated

    use [[UrlService.interceptDeferred]]

    Returns boolean

Methods

deferIntercept

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

    use UrlService.deferIntercept

    Parameters

    • Optional defer: boolean

    Returns void

href

  • href(urlMatcher: UrlMatcher, params?: any, options?: { absolute: boolean }): string
  • 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.

    • Optional params: any

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

    • Optional options: { absolute: boolean }

      Options object. The options are:

      • absolute: boolean

    Returns string

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

initial

listen

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

    use UrlService.listen

    Parameters

    • Optional enabled: boolean

    Returns Function

match

otherwise

removeRule

rule

  • deprecated

    use UrlRules.rule

    Parameters

    Returns Function

rules

sort

sync

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

    use UrlService.sync

    Parameters

    • Optional evt: any

    Returns void

update

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

    Parameters

    • Optional read: boolean

    Returns void

when

  • deprecated

    use UrlRules.when

    Parameters

    • matcher: RegExp | UrlMatcher | string
    • handler: string | UrlRuleHandlerFn
    • Optional options: { priority: number }
      • priority: number

    Returns UrlRule

Generated using TypeDoc