Builds and returns a URL with interpolated parameters
The UrlMatcher object which is used as the template of the URL to generate.
An object of parameter values to fill the matcher's required parameters.
Options object. The options are:
absolute
- {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl".Returns the fully compiled URL, or null
if params
fail validation against urlMatcher
Starts listening for URL changes
Starts listening for URL changes
Call this sometime after calling deferIntercept to start monitoring the url. This causes UrlRouter to start listening for changes to the URL, if it wasn't already listening.
Internal API.
Internal API.
Pushes a new location to the browser history.
Checks the current URL for a matching rule
Checks the current URL for a matching rule
Triggers an update; the same update that happens when the address bar url changes, aka $locationChangeSuccess
.
This method is useful when you need to use preventDefault()
on the $locationChangeSuccess
event,
perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed
with the transition by calling $urlRouter.sync()
.
Internal API.
Internal API.
Generated using TypeDoc
Builds and returns a URL with interpolated parameters
$bob = $urlRouter.href(new UrlMatcher("/about/:person"), { person: "bob" }); // $bob == "/about/bob";