@@ -750,6 +750,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
750
750
* - **`relative`** - {object=}, When transitioning with relative path (e.g '^'),
751
751
* defines which state to be relative from.
752
752
* - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.
753
+ * - **`resume`** - {boolean=false}, If `true` will broadcast $stateChangeSuccess event only
753
754
* - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params
754
755
* have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd
755
756
* use this when you want to force a reload when *everything* is the same, including search params.
@@ -760,7 +761,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
760
761
$state . transitionTo = function transitionTo ( to , toParams , options ) {
761
762
toParams = toParams || { } ;
762
763
options = extend ( {
763
- location : true , inherit : false , relative : null , notify : true , reload : false , $retry : false
764
+ location : true , inherit : false , relative : null , notify : true , resume : false , reload : false , $retry : false
764
765
} , options || { } ) ;
765
766
766
767
var from = $state . $current , fromParams = $state . params , fromPath = from . path ;
@@ -818,7 +819,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
818
819
toParams = filterByKeys ( objectKeys ( to . params ) , toParams || { } ) ;
819
820
820
821
// Broadcast start event and cancel the transition if requested
821
- if ( options . notify ) {
822
+ if ( options . notify && ! options . resume ) {
822
823
/**
823
824
* @ngdoc event
824
825
* @name ui.router.state.$state#$stateChangeStart
@@ -909,7 +910,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
909
910
} ) ;
910
911
}
911
912
912
- if ( options . notify ) {
913
+ if ( options . notify || options . resume ) {
913
914
/**
914
915
* @ngdoc event
915
916
* @name ui.router.state.$state#$stateChangeSuccess
0 commit comments