@@ -91,7 +91,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
9191 state . params = state . params || { } ;
9292
9393 if ( ! state . parent ) {
94- return keys ( state . params ) ;
94+ return objectKeys ( state . params ) ;
9595 }
9696 var paramNames = { } ; forEach ( state . params , function ( v , k ) { paramNames [ k ] = true ; } ) ;
9797
@@ -811,7 +811,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
811811 }
812812
813813 // Filter parameters before we pass them to event handlers etc.
814- toParams = filterByKeys ( keys ( to . params ) , toParams || { } ) ;
814+ toParams = filterByKeys ( objectKeys ( to . params ) , toParams || { } ) ;
815815
816816 // Broadcast start event and cancel the transition if requested
817817 if ( options . notify ) {
@@ -1086,7 +1086,12 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
10861086 * @returns {string } compiled state url
10871087 */
10881088 $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 || { } ) ;
10901095
10911096 var state = findState ( stateOrName , options . relative ) ;
10921097
@@ -1098,7 +1103,9 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
10981103 if ( ! nav || ! nav . url ) {
10991104 return null ;
11001105 }
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+ } ) ;
11021109 } ;
11031110
11041111 /**
@@ -1128,7 +1135,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
11281135 // necessary. In addition to being available to the controller and onEnter/onExit callbacks,
11291136 // we also need $stateParams to be available for any $injector calls we make during the
11301137 // dependency resolution process.
1131- var $stateParams = ( paramsAreFiltered ) ? params : filterByKeys ( keys ( state . params ) , params ) ;
1138+ var $stateParams = ( paramsAreFiltered ) ? params : filterByKeys ( objectKeys ( state . params ) , params ) ;
11321139 var locals = { $stateParams : $stateParams } ;
11331140
11341141 // Resolve 'global' dependencies for the state, i.e. those not specific to a view.
0 commit comments