An event broadcast on $rootScope
if a transition is cancelled.
Additional arguments to the event handler are provided:
toState
: the Transition Target statetoParams
: the Transition Target ParamsfromState
: the state the transition is coming fromfromParams
: the parameters from the state the transition is coming fromoptions
: any Transition Options$transition$
: the Transition that was cancelledAn event broadcast on $rootScope
when an error occurs during transition.
It's important to note that if you have any errors in your resolve functions (javascript errors, non-existent services, etc) they will not throw traditionally. You must listen for this $stateChangeError event to catch ALL errors.
Additional arguments to the event handler are provided:
toState
: the Transition Target statetoParams
: the Transition Target ParamsfromState
: the state the transition is coming fromfromParams
: the parameters from the state the transition is coming fromerror
: The reason the transition errored.options
: any Transition Options$transition$
: the Transition that erroredAn event broadcast on $rootScope
when the state transition begins.
You can use event.preventDefault()
to prevent the transition from happening and then the transition promise will be
rejected with a 'transition prevented'
value.
Additional arguments to the event handler are provided:
toState
: the Transition Target statetoParams
: the Transition Target ParamsfromState
: the state the transition is coming fromfromParams
: the parameters from the state the transition is coming fromoptions
: any Transition Options$transition$
: the TransitionAn event broadcast on $rootScope
once the state transition is complete.
Additional arguments to the event handler are provided:
toState
: the Transition Target statetoParams
: the Transition Target ParamsfromState
: the state the transition is coming fromfromParams
: the parameters from the state the transition is coming fromoptions
: any Transition Options$transition$
: the Transition that just succeededAn event broadcast on $rootScope
when a requested state cannot be found using the provided state name.
The event is broadcast allowing any handlers a single chance to deal with the error (usually by
lazy-loading the unfound state). A TargetState
object is passed to the listener handler,
you can see its properties in the example. You can use event.preventDefault()
to abort the
transition and the promise returned from transitionTo()
will be rejected with a
'transition aborted'
error.
Additional arguments to the event handler are provided:
unfoundState
Unfound State information. Contains: to, toParams, options
properties.fromState
: the state the transition is coming fromfromParams
: the parameters from the state the transition is coming fromoptions
: any Transition OptionsAnnotates a controller expression (may be a controller function(), a "controllername", or "controllername as name")
Annotates a controller expression (may be a controller function(), a "controllername", or "controllername as name")
returns an array of strings, which are the arguments of the controller expression
This angular 1 provider instantiates a Router and exposes its services via the angular injector
This angular 1 provider instantiates a Router and exposes its services via the angular injector
This is a StateBuilder.builder function for angular1 views
.
This is a StateBuilder.builder function for angular1 views
.
When the StateBuilder builds a State object from a raw StateDeclaration, this builder
handles the views
property with logic specific to angular-ui-router (ng1).
If no views: {}
property exists on the StateDeclaration, then it creates the views
object
and applies the state-level configuration to a view named $default
.
This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.
This emulates most of the behavior of the ui-router 0.2.x $resolve.resolve() service API.
an object, with keys as resolve names and values as injectable functions
key/value pre-resolved data (locals)
a promise for a "parent resolve"
Generated using TypeDoc
Angular 1 plugin: