This callback is called when the view's state is about to be exited.
This callback is used to inform a view that it is about to be exited, due to a new Transition. The callback can ask for user confirmation, and cancel or alter the new Transition. The callback should return a value, or a promise for a value. If a promise is returned, the new Transition waits until the promise settles.
Called when:
Called with:
Relevant return Values:
false
: The transition is cancelled.a value, or a promise for a value.
This callback is called when parameter values have changed.
This callback can be used to respond to changing parameter values in the current state, or in parent/child states. This callback is especially handy when using dynamic parameters (ParamDeclaration.dynamic)
Called when:
Called with:
an object containing the changed parameter values
the new Transition which triggered this callback
angular.module('foo').controller('FancyCtrl', function() {
this.uiOnParamsChanged = function(newParams) {
console.log("new params: ", newParams);
}
});
Generated using TypeDoc
The shape of a controller for a view (and/or component), defining the controller callbacks.
A view in UI-Router is comprised of either a
component
([[Ng2ViewDeclaration.component]]) or a combination of atemplate
(ortemplateProvider
) and acontroller
(orcontrollerProvider
).The
controller
object (or thecomponent
's controller object) can define component-level controller callbacks, which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks (IHookRegistry), but are only called if the view is currently active.This interface defines the UI-Router component callbacks.
TODO: this should extend the ng2 Component interface