vendor/assets/javascripts/unstable/angular-mocks.js in angularjs-rails-1.2.25 vs vendor/assets/javascripts/unstable/angular-mocks.js in angularjs-rails-1.2.26

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license AngularJS v1.3.0-rc.3 + * @license AngularJS v1.3.0-rc.5 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { @@ -51,13 +51,14 @@ // register url polling fn self.onUrlChange = function(listener) { self.pollFns.push( function() { - if (self.$$lastUrl != self.$$url) { + if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) { self.$$lastUrl = self.$$url; - listener(self.$$url); + self.$$lastState = self.$$state; + listener(self.$$url, self.$$state); } } ); return listener; @@ -149,19 +150,28 @@ addPollFn: function(pollFn) { this.pollFns.push(pollFn); return pollFn; }, - url: function(url, replace) { + url: function(url, replace, state) { + if (angular.isUndefined(state)) { + state = null; + } if (url) { this.$$url = url; + // Native pushState serializes & copies the object; simulate it. + this.$$state = angular.copy(state); return this; } return this.$$url; }, + state: function() { + return this.$$state; + }, + cookies: function(name, value) { if (name) { if (angular.isUndefined(value)) { delete this.cookieHash[name]; } else { @@ -804,9 +814,10 @@ ['enter','leave','move','addClass','removeClass','setClass'], function(method) { animate[method] = function() { animate.queue.push({ event : method, element : arguments[0], + options : arguments[arguments.length-1], args : arguments }); return $delegate[method].apply($delegate, arguments); }; });