angularjs-rails 1.2.15 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -69,7 +69,7 @@ function minErr(module) {
69
69
  return match;
70
70
  });
71
71
 
72
- message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.3/' +
72
+ message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.5/' +
73
73
  (module ? module + '/' : '') + code;
74
74
  for (i = 2; i < arguments.length; i++) {
75
75
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -152,9 +152,9 @@ function setupModuleLoader(window) {
152
152
  * {@link angular.bootstrap} to simplify this process for you.
153
153
  *
154
154
  * @param {!string} name The name of the module to create or retrieve.
155
- * @param {Array.<string>=} requires If specified then new module is being created. If
155
+ * @param {!Array.<string>=} requires If specified then new module is being created. If
156
156
  * unspecified then the module is being retrieved for further configuration.
157
- * @param {Function} configFn Optional configuration function for the module. Same as
157
+ * @param {Function=} configFn Optional configuration function for the module. Same as
158
158
  * {@link angular.Module#config Module#config()}.
159
159
  * @returns {module} new module with the {@link angular.Module} api.
160
160
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1097,12 +1097,12 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1097
1097
  responsesPush = angular.bind(responses, responses.push),
1098
1098
  copy = angular.copy;
1099
1099
 
1100
- function createResponse(status, data, headers) {
1100
+ function createResponse(status, data, headers, statusText) {
1101
1101
  if (angular.isFunction(status)) return status;
1102
1102
 
1103
1103
  return function() {
1104
1104
  return angular.isNumber(status)
1105
- ? [status, data, headers]
1105
+ ? [status, data, headers, statusText]
1106
1106
  : [200, status, data];
1107
1107
  };
1108
1108
  }
@@ -1127,7 +1127,8 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1127
1127
  function handleResponse() {
1128
1128
  var response = wrapped.response(method, url, data, headers);
1129
1129
  xhr.$$respHeaders = response[2];
1130
- callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders());
1130
+ callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(),
1131
+ copy(response[3] || ''));
1131
1132
  }
1132
1133
 
1133
1134
  function handleTimeout() {
@@ -1195,16 +1196,17 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1195
1196
  * request is handled.
1196
1197
  *
1197
1198
  * - respond –
1198
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1199
- * The respond method takes a set of static data to be returned or a function that can return
1200
- * an array containing response status (number), response data (string) and response headers
1201
- * (Object).
1199
+ * `{function([status,] data[, headers, statusText])
1200
+ * | function(function(method, url, data, headers)}`
1201
+ * The respond method takes a set of static data to be returned or a function that can
1202
+ * return an array containing response status (number), response data (string), response
1203
+ * headers (Object), and the text for the status (string).
1202
1204
  */
1203
1205
  $httpBackend.when = function(method, url, data, headers) {
1204
1206
  var definition = new MockHttpExpectation(method, url, data, headers),
1205
1207
  chain = {
1206
- respond: function(status, data, headers) {
1207
- definition.response = createResponse(status, data, headers);
1208
+ respond: function(status, data, headers, statusText) {
1209
+ definition.response = createResponse(status, data, headers, statusText);
1208
1210
  }
1209
1211
  };
1210
1212
 
@@ -1319,17 +1321,18 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1319
1321
  * request is handled.
1320
1322
  *
1321
1323
  * - respond –
1322
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1323
- * The respond method takes a set of static data to be returned or a function that can return
1324
- * an array containing response status (number), response data (string) and response headers
1325
- * (Object).
1324
+ * `{function([status,] data[, headers, statusText])
1325
+ * | function(function(method, url, data, headers)}`
1326
+ * The respond method takes a set of static data to be returned or a function that can
1327
+ * return an array containing response status (number), response data (string), response
1328
+ * headers (Object), and the text for the status (string).
1326
1329
  */
1327
1330
  $httpBackend.expect = function(method, url, data, headers) {
1328
1331
  var expectation = new MockHttpExpectation(method, url, data, headers);
1329
1332
  expectations.push(expectation);
1330
1333
  return {
1331
- respond: function(status, data, headers) {
1332
- expectation.response = createResponse(status, data, headers);
1334
+ respond: function (status, data, headers, statusText) {
1335
+ expectation.response = createResponse(status, data, headers, statusText);
1333
1336
  }
1334
1337
  };
1335
1338
  };
@@ -1840,13 +1843,14 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
1840
1843
  * control how a matched request is handled.
1841
1844
  *
1842
1845
  * - respond –
1843
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1846
+ * `{function([status,] data[, headers, statusText])
1847
+ * | function(function(method, url, data, headers)}`
1844
1848
  * – The respond method takes a set of static data to be returned or a function that can return
1845
- * an array containing response status (number), response data (string) and response headers
1846
- * (Object).
1847
- * - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
1848
- * handler will be passed through to the real backend (an XHR request will be made to the
1849
- * server.)
1849
+ * an array containing response status (number), response data (string), response headers
1850
+ * (Object), and the text for the status (string).
1851
+ * - passThrough – `{function()}` – Any request matching a backend definition with
1852
+ * `passThrough` handler will be passed through to the real backend (an XHR request will be made
1853
+ * to the server.)
1850
1854
  */
1851
1855
 
1852
1856
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -204,6 +204,9 @@ function shallowClearAndCopy(src, dst) {
204
204
  * On failure, the promise is resolved with the {@link ng.$http http response} object, without
205
205
  * the `resource` property.
206
206
  *
207
+ * If an interceptor object was provided, the promise will instead be resolved with the value
208
+ * returned by the interceptor.
209
+ *
207
210
  * - `$resolved`: `true` after first server interaction is completed (either with success or
208
211
  * rejection), `false` before that. Knowing if the Resource has been resolved is useful in
209
212
  * data-binding.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.3.0-beta.3
2
+ * @license AngularJS v1.3.0-beta.5
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -9790,7 +9790,7 @@ if ( typeof module === "object" && module && typeof module.exports === "object"
9790
9790
  })( window );
9791
9791
 
9792
9792
  /**
9793
- * @license AngularJS v1.3.0-beta.3
9793
+ * @license AngularJS v1.3.0-beta.5
9794
9794
  * (c) 2010-2014 Google, Inc. http://angularjs.org
9795
9795
  * License: MIT
9796
9796
  */
@@ -9860,7 +9860,7 @@ function minErr(module) {
9860
9860
  return match;
9861
9861
  });
9862
9862
 
9863
- message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.3/' +
9863
+ message = message + '\nhttp://errors.angularjs.org/1.3.0-beta.5/' +
9864
9864
  (module ? module + '/' : '') + code;
9865
9865
  for (i = 2; i < arguments.length; i++) {
9866
9866
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -11147,7 +11147,7 @@ function angularInit(element, bootstrap) {
11147
11147
  * </file>
11148
11148
  * </example>
11149
11149
  *
11150
- * @param {Element} element DOM element which is the root of angular application.
11150
+ * @param {DOMElement} element DOM element which is the root of angular application.
11151
11151
  * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
11152
11152
  * Each item in the array should be the name of a predefined module or a (DI annotated)
11153
11153
  * function that will be invoked by the injector as a run block.
@@ -11381,9 +11381,9 @@ function setupModuleLoader(window) {
11381
11381
  * {@link angular.bootstrap} to simplify this process for you.
11382
11382
  *
11383
11383
  * @param {!string} name The name of the module to create or retrieve.
11384
- * @param {Array.<string>=} requires If specified then new module is being created. If
11384
+ * @param {!Array.<string>=} requires If specified then new module is being created. If
11385
11385
  * unspecified then the module is being retrieved for further configuration.
11386
- * @param {Function} configFn Optional configuration function for the module. Same as
11386
+ * @param {Function=} configFn Optional configuration function for the module. Same as
11387
11387
  * {@link angular.Module#config Module#config()}.
11388
11388
  * @returns {module} new module with the {@link angular.Module} api.
11389
11389
  */
@@ -11711,11 +11711,11 @@ function setupModuleLoader(window) {
11711
11711
  * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
11712
11712
  */
11713
11713
  var version = {
11714
- full: '1.3.0-beta.3', // all of these placeholder strings will be replaced by grunt's
11714
+ full: '1.3.0-beta.5', // all of these placeholder strings will be replaced by grunt's
11715
11715
  major: 1, // package task
11716
11716
  minor: 3,
11717
11717
  dot: 0,
11718
- codeName: 'emotional-waffles'
11718
+ codeName: 'chimeric-glitterfication'
11719
11719
  };
11720
11720
 
11721
11721
 
@@ -12018,6 +12018,81 @@ function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArgu
12018
12018
  }
12019
12019
  }
12020
12020
 
12021
+ var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
12022
+ var HTML_REGEXP = /<|&#?\w+;/;
12023
+ var TAG_NAME_REGEXP = /<([\w:]+)/;
12024
+ var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
12025
+
12026
+ var wrapMap = {
12027
+ 'option': [1, '<select multiple="multiple">', '</select>'],
12028
+
12029
+ 'thead': [1, '<table>', '</table>'],
12030
+ 'col': [2, '<table><colgroup>', '</colgroup></table>'],
12031
+ 'tr': [2, '<table><tbody>', '</tbody></table>'],
12032
+ 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
12033
+ '_default': [0, "", ""]
12034
+ };
12035
+
12036
+ wrapMap.optgroup = wrapMap.option;
12037
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
12038
+ wrapMap.th = wrapMap.td;
12039
+
12040
+ function jqLiteIsTextNode(html) {
12041
+ return !HTML_REGEXP.test(html);
12042
+ }
12043
+
12044
+ function jqLiteBuildFragment(html, context) {
12045
+ var elem, tmp, tag, wrap,
12046
+ fragment = context.createDocumentFragment(),
12047
+ nodes = [], i;
12048
+
12049
+ if (jqLiteIsTextNode(html)) {
12050
+ // Convert non-html into a text node
12051
+ nodes.push(context.createTextNode(html));
12052
+ } else {
12053
+ // Convert html into DOM nodes
12054
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
12055
+ tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
12056
+ wrap = wrapMap[tag] || wrapMap._default;
12057
+ tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
12058
+
12059
+ // Descend through wrappers to the right content
12060
+ i = wrap[0];
12061
+ while (i--) {
12062
+ tmp = tmp.lastChild;
12063
+ }
12064
+
12065
+ nodes = concat(nodes, tmp.childNodes);
12066
+
12067
+ tmp = fragment.firstChild;
12068
+ tmp.textContent = "";
12069
+ }
12070
+
12071
+ // Remove wrapper from fragment
12072
+ fragment.textContent = "";
12073
+ fragment.innerHTML = ""; // Clear inner HTML
12074
+ forEach(nodes, function(node) {
12075
+ fragment.appendChild(node);
12076
+ });
12077
+
12078
+ return fragment;
12079
+ }
12080
+
12081
+ function jqLiteParseHTML(html, context) {
12082
+ context = context || document;
12083
+ var parsed;
12084
+
12085
+ if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
12086
+ return [context.createElement(parsed[1])];
12087
+ }
12088
+
12089
+ if ((parsed = jqLiteBuildFragment(html, context))) {
12090
+ return parsed.childNodes;
12091
+ }
12092
+
12093
+ return [];
12094
+ }
12095
+
12021
12096
  /////////////////////////////////////////////
12022
12097
  function JQLite(element) {
12023
12098
  if (element instanceof JQLite) {
@@ -12034,14 +12109,7 @@ function JQLite(element) {
12034
12109
  }
12035
12110
 
12036
12111
  if (isString(element)) {
12037
- var div = document.createElement('div');
12038
- // Read about the NoScope elements here:
12039
- // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
12040
- div.innerHTML = '<div>&#160;</div>' + element; // IE insanity to make NoScope elements work!
12041
- div.removeChild(div.firstChild); // remove the superfluous div
12042
- jqLiteAddNodes(this, div.childNodes);
12043
- var fragment = jqLite(document.createDocumentFragment());
12044
- fragment.append(this); // detach the elements from the temporary DOM div.
12112
+ jqLiteAddNodes(this, jqLiteParseHTML(element));
12045
12113
  } else {
12046
12114
  jqLiteAddNodes(this, element);
12047
12115
  }
@@ -13834,8 +13902,9 @@ var $AnimateProvider = ['$provide', function($provide) {
13834
13902
  * @ngdoc method
13835
13903
  * @name $animate#enter
13836
13904
  * @function
13837
- * @description Inserts the element into the DOM either after the `after` element or within
13838
- * the `parent` element. Once complete, the done() callback will be fired (if provided).
13905
+ * @description Inserts the element into the DOM either after the `after` element or
13906
+ * as the first child within the `parent` element. Once complete, the done() callback
13907
+ * will be fired (if provided).
13839
13908
  * @param {DOMElement} element the element which will be inserted into the DOM
13840
13909
  * @param {DOMElement} parent the parent element which will append the element as
13841
13910
  * a child (if the after element is not present)
@@ -13845,14 +13914,9 @@ var $AnimateProvider = ['$provide', function($provide) {
13845
13914
  * inserted into the DOM
13846
13915
  */
13847
13916
  enter : function(element, parent, after, done) {
13848
- if (after) {
13849
- after.after(element);
13850
- } else {
13851
- if (!parent || !parent[0]) {
13852
- parent = after.parent();
13853
- }
13854
- parent.append(element);
13855
- }
13917
+ after
13918
+ ? after.after(element)
13919
+ : parent.prepend(element);
13856
13920
  async(done);
13857
13921
  },
13858
13922
 
@@ -14367,7 +14431,8 @@ function $BrowserProvider(){
14367
14431
  * @name $cacheFactory
14368
14432
  *
14369
14433
  * @description
14370
- * Factory that constructs cache objects and gives access to them.
14434
+ * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
14435
+ * them.
14371
14436
  *
14372
14437
  * ```js
14373
14438
  *
@@ -14399,6 +14464,46 @@ function $BrowserProvider(){
14399
14464
  * - `{void}` `removeAll()` — Removes all cached values.
14400
14465
  * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
14401
14466
  *
14467
+ * @example
14468
+ <example module="cacheExampleApp">
14469
+ <file name="index.html">
14470
+ <div ng-controller="CacheController">
14471
+ <input ng-model="newCacheKey" placeholder="Key">
14472
+ <input ng-model="newCacheValue" placeholder="Value">
14473
+ <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
14474
+
14475
+ <p ng-if="keys.length">Cached Values</p>
14476
+ <div ng-repeat="key in keys">
14477
+ <span ng-bind="key"></span>
14478
+ <span>: </span>
14479
+ <b ng-bind="cache.get(key)"></b>
14480
+ </div>
14481
+
14482
+ <p>Cache Info</p>
14483
+ <div ng-repeat="(key, value) in cache.info()">
14484
+ <span ng-bind="key"></span>
14485
+ <span>: </span>
14486
+ <b ng-bind="value"></b>
14487
+ </div>
14488
+ </div>
14489
+ </file>
14490
+ <file name="script.js">
14491
+ angular.module('cacheExampleApp', []).
14492
+ controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
14493
+ $scope.keys = [];
14494
+ $scope.cache = $cacheFactory('cacheId');
14495
+ $scope.put = function(key, value) {
14496
+ $scope.cache.put(key, value);
14497
+ $scope.keys.push(key);
14498
+ };
14499
+ }]);
14500
+ </file>
14501
+ <file name="style.css">
14502
+ p {
14503
+ margin: 10px 0 3px;
14504
+ }
14505
+ </file>
14506
+ </example>
14402
14507
  */
14403
14508
  function $CacheFactoryProvider() {
14404
14509
 
@@ -14418,8 +14523,65 @@ function $CacheFactoryProvider() {
14418
14523
  freshEnd = null,
14419
14524
  staleEnd = null;
14420
14525
 
14526
+ /**
14527
+ * @ngdoc type
14528
+ * @name $cacheFactory.Cache
14529
+ *
14530
+ * @description
14531
+ * A cache object used to store and retrieve data, primarily used by
14532
+ * {@link $http $http} and the {@link ng.directive:script script} directive to cache
14533
+ * templates and other data.
14534
+ *
14535
+ * ```js
14536
+ * angular.module('superCache')
14537
+ * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
14538
+ * return $cacheFactory('super-cache');
14539
+ * }]);
14540
+ * ```
14541
+ *
14542
+ * Example test:
14543
+ *
14544
+ * ```js
14545
+ * it('should behave like a cache', inject(function(superCache) {
14546
+ * superCache.put('key', 'value');
14547
+ * superCache.put('another key', 'another value');
14548
+ *
14549
+ * expect(superCache.info()).toEqual({
14550
+ * id: 'super-cache',
14551
+ * size: 2
14552
+ * });
14553
+ *
14554
+ * superCache.remove('another key');
14555
+ * expect(superCache.get('another key')).toBeUndefined();
14556
+ *
14557
+ * superCache.removeAll();
14558
+ * expect(superCache.info()).toEqual({
14559
+ * id: 'super-cache',
14560
+ * size: 0
14561
+ * });
14562
+ * }));
14563
+ * ```
14564
+ */
14421
14565
  return caches[cacheId] = {
14422
14566
 
14567
+ /**
14568
+ * @ngdoc method
14569
+ * @name $cacheFactory.Cache#put
14570
+ * @function
14571
+ *
14572
+ * @description
14573
+ * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
14574
+ * retrieved later, and incrementing the size of the cache if the key was not already
14575
+ * present in the cache. If behaving like an LRU cache, it will also remove stale
14576
+ * entries from the set.
14577
+ *
14578
+ * It will not insert undefined values into the cache.
14579
+ *
14580
+ * @param {string} key the key under which the cached data is stored.
14581
+ * @param {*} value the value to store alongside the key. If it is undefined, the key
14582
+ * will not be stored.
14583
+ * @returns {*} the value stored.
14584
+ */
14423
14585
  put: function(key, value) {
14424
14586
  if (capacity < Number.MAX_VALUE) {
14425
14587
  var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
@@ -14438,7 +14600,17 @@ function $CacheFactoryProvider() {
14438
14600
  return value;
14439
14601
  },
14440
14602
 
14441
-
14603
+ /**
14604
+ * @ngdoc method
14605
+ * @name $cacheFactory.Cache#get
14606
+ * @function
14607
+ *
14608
+ * @description
14609
+ * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
14610
+ *
14611
+ * @param {string} key the key of the data to be retrieved
14612
+ * @returns {*} the value stored.
14613
+ */
14442
14614
  get: function(key) {
14443
14615
  if (capacity < Number.MAX_VALUE) {
14444
14616
  var lruEntry = lruHash[key];
@@ -14452,6 +14624,16 @@ function $CacheFactoryProvider() {
14452
14624
  },
14453
14625
 
14454
14626
 
14627
+ /**
14628
+ * @ngdoc method
14629
+ * @name $cacheFactory.Cache#remove
14630
+ * @function
14631
+ *
14632
+ * @description
14633
+ * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
14634
+ *
14635
+ * @param {string} key the key of the entry to be removed
14636
+ */
14455
14637
  remove: function(key) {
14456
14638
  if (capacity < Number.MAX_VALUE) {
14457
14639
  var lruEntry = lruHash[key];
@@ -14470,6 +14652,14 @@ function $CacheFactoryProvider() {
14470
14652
  },
14471
14653
 
14472
14654
 
14655
+ /**
14656
+ * @ngdoc method
14657
+ * @name $cacheFactory.Cache#removeAll
14658
+ * @function
14659
+ *
14660
+ * @description
14661
+ * Clears the cache object of any entries.
14662
+ */
14473
14663
  removeAll: function() {
14474
14664
  data = {};
14475
14665
  size = 0;
@@ -14478,6 +14668,15 @@ function $CacheFactoryProvider() {
14478
14668
  },
14479
14669
 
14480
14670
 
14671
+ /**
14672
+ * @ngdoc method
14673
+ * @name $cacheFactory.Cache#destroy
14674
+ * @function
14675
+ *
14676
+ * @description
14677
+ * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
14678
+ * removing it from the {@link $cacheFactory $cacheFactory} set.
14679
+ */
14481
14680
  destroy: function() {
14482
14681
  data = null;
14483
14682
  stats = null;
@@ -14486,6 +14685,22 @@ function $CacheFactoryProvider() {
14486
14685
  },
14487
14686
 
14488
14687
 
14688
+ /**
14689
+ * @ngdoc method
14690
+ * @name $cacheFactory.Cache#info
14691
+ * @function
14692
+ *
14693
+ * @description
14694
+ * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
14695
+ *
14696
+ * @returns {object} an object with the following properties:
14697
+ * <ul>
14698
+ * <li>**id**: the id of the cache instance</li>
14699
+ * <li>**size**: the number of entries kept in the cache instance</li>
14700
+ * <li>**...**: any additional properties from the options object when creating the
14701
+ * cache.</li>
14702
+ * </ul>
14703
+ */
14489
14704
  info: function() {
14490
14705
  return extend({}, stats, {size: size});
14491
14706
  }
@@ -14672,6 +14887,7 @@ function $TemplateCacheProvider() {
14672
14887
  * restrict: 'A',
14673
14888
  * scope: false,
14674
14889
  * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
14890
+ * controllerAs: 'stringAlias',
14675
14891
  * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
14676
14892
  * compile: function compile(tElement, tAttrs, transclude) {
14677
14893
  * return {
@@ -14889,6 +15105,16 @@ function $TemplateCacheProvider() {
14889
15105
  * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
14890
15106
  * should be done in a linking function rather than in a compile function.
14891
15107
  * </div>
15108
+
15109
+ * <div class="alert alert-warning">
15110
+ * **Note:** The compile function cannot handle directives that recursively use themselves in their
15111
+ * own templates or compile functions. Compiling these directives results in an infinite loop and a
15112
+ * stack overflow errors.
15113
+ *
15114
+ * This can be avoided by manually using $compile in the postLink function to imperatively compile
15115
+ * a directive's template instead of relying on automatic template compilation via `template` or
15116
+ * `templateUrl` declaration or manual compilation inside the compile function.
15117
+ * </div>
14892
15118
  *
14893
15119
  * <div class="alert alert-error">
14894
15120
  * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
@@ -15110,8 +15336,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15110
15336
  var hasDirectives = {},
15111
15337
  Suffix = 'Directive',
15112
15338
  COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
15113
- CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
15114
- TABLE_CONTENT_REGEXP = /^<\s*(tr|th|td|thead|tbody|tfoot)(\s+[^>]*)?>/i;
15339
+ CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/;
15115
15340
 
15116
15341
  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
15117
15342
  // The assumption is that future DOM event attribute names will begin with
@@ -15856,7 +16081,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15856
16081
 
15857
16082
  if (directive.replace) {
15858
16083
  replaceDirective = directive;
15859
- $template = directiveTemplateContents(directiveValue);
16084
+ if (jqLiteIsTextNode(directiveValue)) {
16085
+ $template = [];
16086
+ } else {
16087
+ $template = jqLite(directiveValue);
16088
+ }
15860
16089
  compileNode = $template[0];
15861
16090
 
15862
16091
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -16255,27 +16484,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16255
16484
  }
16256
16485
 
16257
16486
 
16258
- function directiveTemplateContents(template) {
16259
- var type;
16260
- template = trim(template);
16261
- if ((type = TABLE_CONTENT_REGEXP.exec(template))) {
16262
- type = type[1].toLowerCase();
16263
- var table = jqLite('<table>' + template + '</table>');
16264
- if (/(thead|tbody|tfoot)/.test(type)) {
16265
- return table.children(type);
16266
- }
16267
- table = table.children('tbody');
16268
- if (type === 'tr') {
16269
- return table.children('tr');
16270
- }
16271
- return table.children('tr').contents();
16272
- }
16273
- return jqLite('<div>' +
16274
- template +
16275
- '</div>').contents();
16276
- }
16277
-
16278
-
16279
16487
  function compileTemplateUrl(directives, $compileNode, tAttrs,
16280
16488
  $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
16281
16489
  var linkQueue = [],
@@ -16300,7 +16508,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16300
16508
  content = denormalizeTemplate(content);
16301
16509
 
16302
16510
  if (origAsyncDirective.replace) {
16303
- $template = directiveTemplateContents(content);
16511
+ if (jqLiteIsTextNode(content)) {
16512
+ $template = [];
16513
+ } else {
16514
+ $template = jqLite(content);
16515
+ }
16304
16516
  compileNode = $template[0];
16305
16517
 
16306
16518
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -17078,7 +17290,7 @@ function $HttpProvider() {
17078
17290
  *
17079
17291
  * ```
17080
17292
  * module.run(function($http) {
17081
- * $http.defaults.headers.common.Authentication = 'Basic YmVlcDpib29w'
17293
+ * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
17082
17294
  * });
17083
17295
  * ```
17084
17296
  *
@@ -17372,6 +17584,7 @@ function $HttpProvider() {
17372
17584
  * - **status** – `{number}` – HTTP status code of the response.
17373
17585
  * - **headers** – `{function([headerName])}` – Header getter function.
17374
17586
  * - **config** – `{Object}` – The configuration object that was used to generate the request.
17587
+ * - **statusText** – `{string}` – HTTP status text of the response.
17375
17588
  *
17376
17589
  * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
17377
17590
  * requests. This is primarily meant to be used for debugging purposes.
@@ -17746,9 +17959,9 @@ function $HttpProvider() {
17746
17959
  } else {
17747
17960
  // serving from cache
17748
17961
  if (isArray(cachedResp)) {
17749
- resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));
17962
+ resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]), cachedResp[3]);
17750
17963
  } else {
17751
- resolvePromise(cachedResp, 200, {});
17964
+ resolvePromise(cachedResp, 200, {}, 'OK');
17752
17965
  }
17753
17966
  }
17754
17967
  } else {
@@ -17772,17 +17985,17 @@ function $HttpProvider() {
17772
17985
  * - resolves the raw $http promise
17773
17986
  * - calls $apply
17774
17987
  */
17775
- function done(status, response, headersString) {
17988
+ function done(status, response, headersString, statusText) {
17776
17989
  if (cache) {
17777
17990
  if (isSuccess(status)) {
17778
- cache.put(url, [status, response, parseHeaders(headersString)]);
17991
+ cache.put(url, [status, response, parseHeaders(headersString), statusText]);
17779
17992
  } else {
17780
17993
  // remove promise from the cache
17781
17994
  cache.remove(url);
17782
17995
  }
17783
17996
  }
17784
17997
 
17785
- resolvePromise(response, status, headersString);
17998
+ resolvePromise(response, status, headersString, statusText);
17786
17999
  if (!$rootScope.$$phase) $rootScope.$apply();
17787
18000
  }
17788
18001
 
@@ -17790,7 +18003,7 @@ function $HttpProvider() {
17790
18003
  /**
17791
18004
  * Resolves the raw $http promise.
17792
18005
  */
17793
- function resolvePromise(response, status, headers) {
18006
+ function resolvePromise(response, status, headers, statusText) {
17794
18007
  // normalize internal statuses to 0
17795
18008
  status = Math.max(status, 0);
17796
18009
 
@@ -17798,7 +18011,8 @@ function $HttpProvider() {
17798
18011
  data: response,
17799
18012
  status: status,
17800
18013
  headers: headersGetter(headers),
17801
- config: config
18014
+ config: config,
18015
+ statusText : statusText
17802
18016
  });
17803
18017
  }
17804
18018
 
@@ -17929,7 +18143,8 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
17929
18143
  completeRequest(callback,
17930
18144
  status || xhr.status,
17931
18145
  response,
17932
- responseHeaders);
18146
+ responseHeaders,
18147
+ xhr.statusText || '');
17933
18148
  }
17934
18149
  };
17935
18150
 
@@ -17970,7 +18185,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
17970
18185
  xhr && xhr.abort();
17971
18186
  }
17972
18187
 
17973
- function completeRequest(callback, status, response, headersString) {
18188
+ function completeRequest(callback, status, response, headersString, statusText) {
17974
18189
  // cancel timeout and subsequent timeout promise resolution
17975
18190
  timeoutId && $browserDefer.cancel(timeoutId);
17976
18191
  jsonpDone = xhr = null;
@@ -17983,9 +18198,10 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
17983
18198
  }
17984
18199
 
17985
18200
  // normalize IE bug (http://bugs.jquery.com/ticket/1450)
17986
- status = status == 1223 ? 204 : status;
18201
+ status = status === 1223 ? 204 : status;
18202
+ statusText = statusText || '';
17987
18203
 
17988
- callback(status, response, headersString);
18204
+ callback(status, response, headersString, statusText);
17989
18205
  $browser.$$completeOutstandingRequest(noop);
17990
18206
  }
17991
18207
  };
@@ -19027,8 +19243,7 @@ function locationGetterSetter(property, preprocess) {
19027
19243
  * - Clicks on a link.
19028
19244
  * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
19029
19245
  *
19030
- * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular
19031
- * Services: Using $location}
19246
+ * For more information see {@link guide/$location Developer Guide: Using $location}
19032
19247
  */
19033
19248
 
19034
19249
  /**
@@ -19764,7 +19979,11 @@ var Parser = function (lexer, $filter, options) {
19764
19979
  this.options = options;
19765
19980
  };
19766
19981
 
19767
- Parser.ZERO = function () { return 0; };
19982
+ Parser.ZERO = extend(function () {
19983
+ return 0;
19984
+ }, {
19985
+ constant: true
19986
+ });
19768
19987
 
19769
19988
  Parser.prototype = {
19770
19989
  constructor: Parser,
@@ -21509,7 +21728,8 @@ function $RootScopeProvider(){
21509
21728
  * - `function(newValue, oldValue, scope)`: called with current and previous values as
21510
21729
  * parameters.
21511
21730
  *
21512
- * @param {boolean=} objectEquality Compare object for equality rather than for reference.
21731
+ * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
21732
+ * comparing for reference equality.
21513
21733
  * @returns {function()} Returns a deregistration function for this listener.
21514
21734
  */
21515
21735
  $watch: function(watchExp, listener, objectEquality) {
@@ -21930,15 +22150,32 @@ function $RootScopeProvider(){
21930
22150
 
21931
22151
  forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));
21932
22152
 
22153
+ // sever all the references to parent scopes (after this cleanup, the current scope should
22154
+ // not be retained by any of our references and should be eligible for garbage collection)
21933
22155
  if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
21934
22156
  if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
21935
22157
  if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
21936
22158
  if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
21937
22159
 
21938
- // This is bogus code that works around Chrome's GC leak
21939
- // see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
22160
+
22161
+ // All of the code below is bogus code that works around V8's memory leak via optimized code
22162
+ // and inline caches.
22163
+ //
22164
+ // see:
22165
+ // - https://code.google.com/p/v8/issues/detail?id=2073#c26
22166
+ // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
22167
+ // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
22168
+
21940
22169
  this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
21941
- this.$$childTail = null;
22170
+ this.$$childTail = this.$root = null;
22171
+
22172
+ // don't reset these to null in case some async task tries to register a listener/watch/task
22173
+ this.$$listeners = {};
22174
+ this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];
22175
+
22176
+ // prevent NPEs since these methods have references to properties we nulled out
22177
+ this.$destroy = this.$digest = this.$apply = noop;
22178
+ this.$on = this.$watch = function() { return noop; };
21942
22179
  },
21943
22180
 
21944
22181
  /**
@@ -22907,7 +23144,7 @@ function $SceDelegateProvider() {
22907
23144
  * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. |
22908
23145
  * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
22909
23146
  * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
22910
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contens are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
23147
+ * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
22911
23148
  * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
22912
23149
  *
22913
23150
  * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
@@ -24755,7 +24992,7 @@ function limitToFilter(){
24755
24992
  * - `Array`: An array of function or string predicates. The first predicate in the array
24756
24993
  * is used for sorting, but when two items are equivalent, the next predicate is used.
24757
24994
  *
24758
- * @param {boolean=} reverse Reverse the order the array.
24995
+ * @param {boolean=} reverse Reverse the order of the array.
24759
24996
  * @returns {Array} Sorted copy of the source array.
24760
24997
  *
24761
24998
  * @example
@@ -25520,6 +25757,10 @@ function FormController(element, attrs, $scope, $animate) {
25520
25757
  * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
25521
25758
  * sub-group of controls needs to be determined.
25522
25759
  *
25760
+ * Note: the purpose of `ngForm` is to group controls,
25761
+ * but not to be a replacement for the `<form>` tag with all of its capabilities
25762
+ * (e.g. posting to the server, ...).
25763
+ *
25523
25764
  * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
25524
25765
  * related scope, under this name.
25525
25766
  *
@@ -26600,7 +26841,6 @@ function addNativeHtml5Validators(ctrl, validatorName, element) {
26600
26841
  return value;
26601
26842
  };
26602
26843
  ctrl.$parsers.push(validator);
26603
- ctrl.$formatters.push(validator);
26604
26844
  }
26605
26845
  }
26606
26846
 
@@ -28034,7 +28274,7 @@ var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {
28034
28274
 
28035
28275
  function classDirective(name, selector) {
28036
28276
  name = 'ngClass' + name;
28037
- return function() {
28277
+ return ['$animate', function($animate) {
28038
28278
  return {
28039
28279
  restrict: 'AC',
28040
28280
  link: function(scope, element, attr) {
@@ -28052,46 +28292,100 @@ function classDirective(name, selector) {
28052
28292
  // jshint bitwise: false
28053
28293
  var mod = $index & 1;
28054
28294
  if (mod !== old$index & 1) {
28055
- var classes = flattenClasses(scope.$eval(attr[name]));
28295
+ var classes = arrayClasses(scope.$eval(attr[name]));
28056
28296
  mod === selector ?
28057
- attr.$addClass(classes) :
28058
- attr.$removeClass(classes);
28297
+ addClasses(classes) :
28298
+ removeClasses(classes);
28299
+ }
28300
+ });
28301
+ }
28302
+
28303
+ function addClasses(classes) {
28304
+ var newClasses = digestClassCounts(classes, 1);
28305
+ attr.$addClass(newClasses);
28306
+ }
28307
+
28308
+ function removeClasses(classes) {
28309
+ var newClasses = digestClassCounts(classes, -1);
28310
+ attr.$removeClass(newClasses);
28311
+ }
28312
+
28313
+ function digestClassCounts (classes, count) {
28314
+ var classCounts = element.data('$classCounts') || {};
28315
+ var classesToUpdate = [];
28316
+ forEach(classes, function (className) {
28317
+ if (count > 0 || classCounts[className]) {
28318
+ classCounts[className] = (classCounts[className] || 0) + count;
28319
+ if (classCounts[className] === +(count > 0)) {
28320
+ classesToUpdate.push(className);
28321
+ }
28059
28322
  }
28060
28323
  });
28324
+ element.data('$classCounts', classCounts);
28325
+ return classesToUpdate.join(' ');
28061
28326
  }
28062
28327
 
28328
+ function updateClasses (oldClasses, newClasses) {
28329
+ var toAdd = arrayDifference(newClasses, oldClasses);
28330
+ var toRemove = arrayDifference(oldClasses, newClasses);
28331
+ toRemove = digestClassCounts(toRemove, -1);
28332
+ toAdd = digestClassCounts(toAdd, 1);
28333
+
28334
+ if (toAdd.length === 0) {
28335
+ $animate.removeClass(element, toRemove);
28336
+ } else if (toRemove.length === 0) {
28337
+ $animate.addClass(element, toAdd);
28338
+ } else {
28339
+ $animate.setClass(element, toAdd, toRemove);
28340
+ }
28341
+ }
28063
28342
 
28064
28343
  function ngClassWatchAction(newVal) {
28065
28344
  if (selector === true || scope.$index % 2 === selector) {
28066
- var newClasses = flattenClasses(newVal || '');
28067
- if(!oldVal) {
28068
- attr.$addClass(newClasses);
28069
- } else if(!equals(newVal,oldVal)) {
28070
- attr.$updateClass(newClasses, flattenClasses(oldVal));
28345
+ var newClasses = arrayClasses(newVal || []);
28346
+ if (!oldVal) {
28347
+ addClasses(newClasses);
28348
+ } else if (!equals(newVal,oldVal)) {
28349
+ var oldClasses = arrayClasses(oldVal);
28350
+ updateClasses(oldClasses, newClasses);
28071
28351
  }
28072
28352
  }
28073
28353
  oldVal = copy(newVal);
28074
28354
  }
28355
+ }
28356
+ };
28075
28357
 
28358
+ function arrayDifference(tokens1, tokens2) {
28359
+ var values = [];
28076
28360
 
28077
- function flattenClasses(classVal) {
28078
- if(isArray(classVal)) {
28079
- return classVal.join(' ');
28080
- } else if (isObject(classVal)) {
28081
- var classes = [], i = 0;
28082
- forEach(classVal, function(v, k) {
28083
- if (v) {
28084
- classes.push(k);
28085
- }
28086
- });
28087
- return classes.join(' ');
28088
- }
28089
-
28090
- return classVal;
28361
+ outer:
28362
+ for(var i = 0; i < tokens1.length; i++) {
28363
+ var token = tokens1[i];
28364
+ for(var j = 0; j < tokens2.length; j++) {
28365
+ if(token == tokens2[j]) continue outer;
28091
28366
  }
28367
+ values.push(token);
28092
28368
  }
28093
- };
28094
- };
28369
+ return values;
28370
+ }
28371
+
28372
+ function arrayClasses (classVal) {
28373
+ if (isArray(classVal)) {
28374
+ return classVal;
28375
+ } else if (isString(classVal)) {
28376
+ return classVal.split(' ');
28377
+ } else if (isObject(classVal)) {
28378
+ var classes = [], i = 0;
28379
+ forEach(classVal, function(v, k) {
28380
+ if (v) {
28381
+ classes.push(k);
28382
+ }
28383
+ });
28384
+ return classes;
28385
+ }
28386
+ return classVal;
28387
+ }
28388
+ }];
28095
28389
  }
28096
28390
 
28097
28391
  /**
@@ -28652,7 +28946,7 @@ var ngControllerDirective = [function() {
28652
28946
  * @element ANY
28653
28947
  * @priority 0
28654
28948
  * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
28655
- * click. (Event object is available as `$event`)
28949
+ * click. ({@link guide/expression#-event- Event object is available as `$event`})
28656
28950
  *
28657
28951
  * @example
28658
28952
  <example>
@@ -28733,7 +29027,7 @@ forEach(
28733
29027
  * @element ANY
28734
29028
  * @priority 0
28735
29029
  * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
28736
- * mousedown. (Event object is available as `$event`)
29030
+ * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
28737
29031
  *
28738
29032
  * @example
28739
29033
  <example>
@@ -28757,7 +29051,7 @@ forEach(
28757
29051
  * @element ANY
28758
29052
  * @priority 0
28759
29053
  * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
28760
- * mouseup. (Event object is available as `$event`)
29054
+ * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
28761
29055
  *
28762
29056
  * @example
28763
29057
  <example>
@@ -28780,7 +29074,7 @@ forEach(
28780
29074
  * @element ANY
28781
29075
  * @priority 0
28782
29076
  * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
28783
- * mouseover. (Event object is available as `$event`)
29077
+ * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
28784
29078
  *
28785
29079
  * @example
28786
29080
  <example>
@@ -28804,7 +29098,7 @@ forEach(
28804
29098
  * @element ANY
28805
29099
  * @priority 0
28806
29100
  * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
28807
- * mouseenter. (Event object is available as `$event`)
29101
+ * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
28808
29102
  *
28809
29103
  * @example
28810
29104
  <example>
@@ -28828,7 +29122,7 @@ forEach(
28828
29122
  * @element ANY
28829
29123
  * @priority 0
28830
29124
  * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
28831
- * mouseleave. (Event object is available as `$event`)
29125
+ * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
28832
29126
  *
28833
29127
  * @example
28834
29128
  <example>
@@ -28852,7 +29146,7 @@ forEach(
28852
29146
  * @element ANY
28853
29147
  * @priority 0
28854
29148
  * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
28855
- * mousemove. (Event object is available as `$event`)
29149
+ * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
28856
29150
  *
28857
29151
  * @example
28858
29152
  <example>
@@ -28919,7 +29213,8 @@ forEach(
28919
29213
  *
28920
29214
  * @element ANY
28921
29215
  * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
28922
- * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
29216
+ * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
29217
+ * and can be interrogated for keyCode, altKey, etc.)
28923
29218
  *
28924
29219
  * @example
28925
29220
  <example>
@@ -28944,7 +29239,8 @@ forEach(
28944
29239
  *
28945
29240
  * @element form
28946
29241
  * @priority 0
28947
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)
29242
+ * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
29243
+ * ({@link guide/expression#-event- Event object is available as `$event`})
28948
29244
  *
28949
29245
  * @example
28950
29246
  <example>
@@ -28995,7 +29291,7 @@ forEach(
28995
29291
  * @element window, input, select, textarea, a
28996
29292
  * @priority 0
28997
29293
  * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
28998
- * focus. (Event object is available as `$event`)
29294
+ * focus. ({@link guide/expression#-event- Event object is available as `$event`})
28999
29295
  *
29000
29296
  * @example
29001
29297
  * See {@link ng.directive:ngClick ngClick}
@@ -29011,7 +29307,7 @@ forEach(
29011
29307
  * @element window, input, select, textarea, a
29012
29308
  * @priority 0
29013
29309
  * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
29014
- * blur. (Event object is available as `$event`)
29310
+ * blur. ({@link guide/expression#-event- Event object is available as `$event`})
29015
29311
  *
29016
29312
  * @example
29017
29313
  * See {@link ng.directive:ngClick ngClick}
@@ -29027,7 +29323,7 @@ forEach(
29027
29323
  * @element window, input, select, textarea, a
29028
29324
  * @priority 0
29029
29325
  * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
29030
- * copy. (Event object is available as `$event`)
29326
+ * copy. ({@link guide/expression#-event- Event object is available as `$event`})
29031
29327
  *
29032
29328
  * @example
29033
29329
  <example>
@@ -29048,7 +29344,7 @@ forEach(
29048
29344
  * @element window, input, select, textarea, a
29049
29345
  * @priority 0
29050
29346
  * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
29051
- * cut. (Event object is available as `$event`)
29347
+ * cut. ({@link guide/expression#-event- Event object is available as `$event`})
29052
29348
  *
29053
29349
  * @example
29054
29350
  <example>
@@ -29069,7 +29365,7 @@ forEach(
29069
29365
  * @element window, input, select, textarea, a
29070
29366
  * @priority 0
29071
29367
  * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
29072
- * paste. (Event object is available as `$event`)
29368
+ * paste. ({@link guide/expression#-event- Event object is available as `$event`})
29073
29369
  *
29074
29370
  * @example
29075
29371
  <example>
@@ -30211,10 +30507,10 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30211
30507
  * restating the styles for the .ng-hide class in CSS:
30212
30508
  * ```css
30213
30509
  * .ng-hide {
30214
- * //!annotate CSS Specificity|Not to worry, this will override the AngularJS default...
30510
+ * /&#42; Not to worry, this will override the AngularJS default...
30215
30511
  * display:block!important;
30216
30512
  *
30217
- * //this is just another form of hiding an element
30513
+ * /&#42; this is just another form of hiding an element &#42;/
30218
30514
  * position:absolute;
30219
30515
  * top:-9999px;
30220
30516
  * left:-9999px;
@@ -30240,10 +30536,20 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30240
30536
  * //a working example can be found at the bottom of this page
30241
30537
  * //
30242
30538
  * .my-element.ng-hide-add, .my-element.ng-hide-remove {
30243
- * transition:0.5s linear all;
30539
+ * /&#42; this is required as of 1.3x to properly
30540
+ * apply all styling in a show/hide animation &#42;/
30541
+ * transition:0s linear all;
30542
+ *
30543
+ * /&#42; this must be set as block so the animation is visible &#42;/
30244
30544
  * display:block!important;
30245
30545
  * }
30246
30546
  *
30547
+ * .my-element.ng-hide-add-active,
30548
+ * .my-element.ng-hide-remove-active {
30549
+ * /&#42; the transition is defined in the active class &#42;/
30550
+ * transition:1s linear all;
30551
+ * }
30552
+ *
30247
30553
  * .my-element.ng-hide-add { ... }
30248
30554
  * .my-element.ng-hide-add.ng-hide-add-active { ... }
30249
30555
  * .my-element.ng-hide-remove { ... }
@@ -30280,8 +30586,6 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30280
30586
  </file>
30281
30587
  <file name="animations.css">
30282
30588
  .animate-show {
30283
- -webkit-transition:all linear 0.5s;
30284
- transition:all linear 0.5s;
30285
30589
  line-height:20px;
30286
30590
  opacity:1;
30287
30591
  padding:10px;
@@ -30294,6 +30598,12 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30294
30598
  display:block!important;
30295
30599
  }
30296
30600
 
30601
+ .animate-show.ng-hide-add.ng-hide-add-active,
30602
+ .animate-show.ng-hide-remove.ng-hide-remove-active {
30603
+ -webkit-transition:all linear 0.5s;
30604
+ transition:all linear 0.5s;
30605
+ }
30606
+
30297
30607
  .animate-show.ng-hide {
30298
30608
  line-height:0;
30299
30609
  opacity:0;
@@ -30342,7 +30652,7 @@ var ngShowDirective = ['$animate', function($animate) {
30342
30652
  * in AngularJS and sets the display style to none (using an !important flag).
30343
30653
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
30344
30654
  *
30345
- * ```hrml
30655
+ * ```html
30346
30656
  * <!-- when $scope.myValue is truthy (element is hidden) -->
30347
30657
  * <div ng-hide="myValue"></div>
30348
30658
  *
@@ -33731,5 +34041,5 @@ if (config.autotest) {
33731
34041
  })(window, document);
33732
34042
 
33733
34043
 
33734
- !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n\n.ng-animate-block-transitions {\n transition:0s all!important;\n -webkit-transition:0s all!important;\n}\n</style>');
34044
+ !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n</style>');
33735
34045
  !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: \'\\25b8\\00A0\';\n}\n\n.test-info .open:before {\n content: \'\\25be\\00A0\';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: \'\\00bb\\00A0\';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>');