1
1
/**
2
2
* State-based routing for AngularJS
3
- * @version v0.2.15
3
+ * @version v0.2.15-dev-2015-11-19
4
4
* @link http://angular-ui.github.com/
5
5
* @license MIT License, http://www.opensource.org/licenses/MIT
6
6
*/
@@ -20,6 +20,7 @@ var isDefined = angular.isDefined,
20
20
isString = angular . isString ,
21
21
isObject = angular . isObject ,
22
22
isArray = angular . isArray ,
23
+ isDate = angular . isDate ,
23
24
forEach = angular . forEach ,
24
25
extend = angular . extend ,
25
26
copy = angular . copy ;
@@ -139,7 +140,11 @@ function equalForKeys(a, b, keys) {
139
140
140
141
for ( var i = 0 ; i < keys . length ; i ++ ) {
141
142
var k = keys [ i ] ;
142
- if ( a [ k ] != b [ k ] ) return false ; // Not '===', values aren't necessarily normalized
143
+ if ( isDate ( a [ k ] ) && isDate ( b [ k ] ) ) {
144
+ if ( a [ k ] . getTime ( ) !== b [ k ] . getTime ( ) ) return false ;
145
+ } else {
146
+ if ( a [ k ] != b [ k ] ) return false ; // Not '===', values aren't necessarily normalized
147
+ }
143
148
}
144
149
return true ;
145
150
}
@@ -4293,6 +4298,7 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) {
4293
4298
} ;
4294
4299
4295
4300
$scope . $on ( '$stateChangeSuccess' , update ) ;
4301
+ $scope . $on ( '$locationChangeSuccess' , update ) ;
4296
4302
4297
4303
// Update route state
4298
4304
function update ( ) {
0 commit comments