@@ -91,7 +91,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
91
91
state . params = state . params || { } ;
92
92
93
93
if ( ! state . parent ) {
94
- return keys ( state . params ) ;
94
+ return objectKeys ( state . params ) ;
95
95
}
96
96
var paramNames = { } ; forEach ( state . params , function ( v , k ) { paramNames [ k ] = true ; } ) ;
97
97
@@ -811,7 +811,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
811
811
}
812
812
813
813
// Filter parameters before we pass them to event handlers etc.
814
- toParams = filterByKeys ( keys ( to . params ) , toParams || { } ) ;
814
+ toParams = filterByKeys ( objectKeys ( to . params ) , toParams || { } ) ;
815
815
816
816
// Broadcast start event and cancel the transition if requested
817
817
if ( options . notify ) {
@@ -1086,7 +1086,12 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1086
1086
* @returns {string } compiled state url
1087
1087
*/
1088
1088
$state . href = function href ( stateOrName , params , options ) {
1089
- options = extend ( { lossy : true , inherit : false , absolute : false , relative : $state . $current } , options || { } ) ;
1089
+ options = extend ( {
1090
+ lossy : true ,
1091
+ inherit : false ,
1092
+ absolute : false ,
1093
+ relative : $state . $current
1094
+ } , options || { } ) ;
1090
1095
1091
1096
var state = findState ( stateOrName , options . relative ) ;
1092
1097
@@ -1098,7 +1103,9 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1098
1103
if ( ! nav || ! nav . url ) {
1099
1104
return null ;
1100
1105
}
1101
- return $urlRouter . href ( nav . url , filterByKeys ( keys ( state . params ) , params || { } ) , { absolute : options . absolute } ) ;
1106
+ return $urlRouter . href ( nav . url , filterByKeys ( objectKeys ( state . params ) , params || { } ) , {
1107
+ absolute : options . absolute
1108
+ } ) ;
1102
1109
} ;
1103
1110
1104
1111
/**
@@ -1128,7 +1135,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1128
1135
// necessary. In addition to being available to the controller and onEnter/onExit callbacks,
1129
1136
// we also need $stateParams to be available for any $injector calls we make during the
1130
1137
// dependency resolution process.
1131
- var $stateParams = ( paramsAreFiltered ) ? params : filterByKeys ( keys ( state . params ) , params ) ;
1138
+ var $stateParams = ( paramsAreFiltered ) ? params : filterByKeys ( objectKeys ( state . params ) , params ) ;
1132
1139
var locals = { $stateParams : $stateParams } ;
1133
1140
1134
1141
// Resolve 'global' dependencies for the state, i.e. those not specific to a view.
0 commit comments