Disables monitoring of the URL.
Disables monitoring of the URL.
Call this method before UI-Router has bootstrapped. It will stop UI-Router from performing the initial url sync.
This can be useful to perform some asynchronous initialization before the router starts. Once the initialization is complete, call listen to tell UI-Router to start watching and synchronizing the URL.
Indicates whether to defer location change interception. Passing
no parameter is equivalent to true
.
Defines the path or behavior to use when no url can be matched.
Defines the path or behavior to use when no url can be matched.
The url path you want to redirect to or a function rule that returns the url path or performs a $state.go()
.
The function version is passed two params: $injector
and $location
services, and should return a url string.
$urlRouterProvider
- $urlRouterProvider
instance
Registers a url handler function.
Registers a url handler function.
Registers a low level url handler (a rule
). A rule detects specific URL patterns and returns
a redirect, or performs some action.
If a rule returns a string, the URL is replaced with the string, and all rules are fired again.
Handler function that takes $injector
and $location
services as arguments.
You can use them to detect a url and return a different url as a string.
$urlRouterProvider (this
)
Registers a handler for a given url matching.
Registers a handler for a given url matching.
If the handler is a string, it is
treated as a redirect, and is interpolated according to the syntax of match
(i.e. like String.replace()
for RegExp
, or like a UrlMatcher
pattern otherwise).
If the handler is a function, it is injectable.
It gets invoked if $location
matches.
You have the option of inject the match object as $match
.
The handler can return
$urlRouter
will continue trying to find another one that matches.$location.url()
$urlRouter
that the url was handled.A pattern string to match, compiled as a UrlMatcher.
The path (or function that returns a path) that you want to redirect your user to.
Note: the handler may also invoke arbitrary code, such as $state.go()
Generated using TypeDoc
Manages rules for client-side URL
This class manages the router rules for what to do when the URL changes.