angular-gem 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.2.15
2
+ * @license AngularJS v1.2.16
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -112,11 +112,11 @@
112
112
  * -webkit-animation: enter_sequence 1s linear; /* Safari/Chrome */
113
113
  * animation: enter_sequence 1s linear; /* IE10+ and Future Browsers */
114
114
  * }
115
- * &#64-webkit-keyframes enter_sequence {
115
+ * @-webkit-keyframes enter_sequence {
116
116
  * from { opacity:0; }
117
117
  * to { opacity:1; }
118
118
  * }
119
- * &#64keyframes enter_sequence {
119
+ * @keyframes enter_sequence {
120
120
  * from { opacity:0; }
121
121
  * to { opacity:1; }
122
122
  * }
@@ -338,9 +338,12 @@ angular.module('ngAnimate', ['ng'])
338
338
  //operation which performs CSS transition and keyframe
339
339
  //animations sniffing. This is always included for each
340
340
  //element animation procedure if the browser supports
341
- //transitions and/or keyframe animations
341
+ //transitions and/or keyframe animations. The default
342
+ //animation is added to the top of the list to prevent
343
+ //any previous animations from affecting the element styling
344
+ //prior to the element being animated.
342
345
  if ($sniffer.transitions || $sniffer.animations) {
343
- classes.push('');
346
+ matches.push($injector.get(selectors['']));
344
347
  }
345
348
 
346
349
  for(var i=0; i < classes.length; i++) {
@@ -1115,7 +1118,7 @@ angular.module('ngAnimate', ['ng'])
1115
1118
 
1116
1119
  //but it may not need to cancel out the existing timeout
1117
1120
  //if the timestamp is less than the previous one
1118
- var futureTimestamp = Date.now() + (totalTime * 1000);
1121
+ var futureTimestamp = Date.now() + totalTime;
1119
1122
  if(futureTimestamp <= closingTimestamp) {
1120
1123
  return;
1121
1124
  }
@@ -1214,7 +1217,7 @@ angular.module('ngAnimate', ['ng'])
1214
1217
  parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);
1215
1218
  parentID = parentCounter;
1216
1219
  }
1217
- return parentID + '-' + extractElementNode(element).className;
1220
+ return parentID + '-' + extractElementNode(element).getAttribute('class');
1218
1221
  }
1219
1222
 
1220
1223
  function animateSetup(animationEvent, element, className, calculationDecorator) {
@@ -1319,7 +1322,7 @@ angular.module('ngAnimate', ['ng'])
1319
1322
  function animateRun(animationEvent, element, className, activeAnimationComplete) {
1320
1323
  var node = extractElementNode(element);
1321
1324
  var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
1322
- if(node.className.indexOf(className) == -1 || !elementData) {
1325
+ if(node.getAttribute('class').indexOf(className) == -1 || !elementData) {
1323
1326
  activeAnimationComplete();
1324
1327
  return;
1325
1328
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.15
2
+ * @license AngularJS v1.2.16
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.2.15
2
+ * @license AngularJS v1.2.16
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.2.15/' +
72
+ message = message + '\nhttp://errors.angularjs.org/1.2.16/' +
73
73
  (module ? module + '/' : '') + code;
74
74
  for (i = 2; i < arguments.length; i++) {
75
75
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -152,8 +152,8 @@ 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
156
- * unspecified then the module is being retrieved for further configuration.
155
+ <<<<<* @param {!Array.<string>=} requires If specified then new module is being created. If
156
+ >>>>>* unspecified then the module is being retrieved for further configuration.
157
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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.15
2
+ * @license AngularJS v1.2.16
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() {
@@ -1194,16 +1195,17 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1194
1195
  * request is handled.
1195
1196
  *
1196
1197
  * - respond –
1197
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1198
- * The respond method takes a set of static data to be returned or a function that can return
1199
- * an array containing response status (number), response data (string) and response headers
1200
- * (Object).
1198
+ * `{function([status,] data[, headers, statusText])
1199
+ * | function(function(method, url, data, headers)}`
1200
+ * The respond method takes a set of static data to be returned or a function that can
1201
+ * return an array containing response status (number), response data (string), response
1202
+ * headers (Object), and the text for the status (string).
1201
1203
  */
1202
1204
  $httpBackend.when = function(method, url, data, headers) {
1203
1205
  var definition = new MockHttpExpectation(method, url, data, headers),
1204
1206
  chain = {
1205
- respond: function(status, data, headers) {
1206
- definition.response = createResponse(status, data, headers);
1207
+ respond: function(status, data, headers, statusText) {
1208
+ definition.response = createResponse(status, data, headers, statusText);
1207
1209
  }
1208
1210
  };
1209
1211
 
@@ -1311,17 +1313,18 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1311
1313
  * request is handled.
1312
1314
  *
1313
1315
  * - respond –
1314
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1315
- * The respond method takes a set of static data to be returned or a function that can return
1316
- * an array containing response status (number), response data (string) and response headers
1317
- * (Object).
1316
+ * `{function([status,] data[, headers, statusText])
1317
+ * | function(function(method, url, data, headers)}`
1318
+ * The respond method takes a set of static data to be returned or a function that can
1319
+ * return an array containing response status (number), response data (string), response
1320
+ * headers (Object), and the text for the status (string).
1318
1321
  */
1319
1322
  $httpBackend.expect = function(method, url, data, headers) {
1320
1323
  var expectation = new MockHttpExpectation(method, url, data, headers);
1321
1324
  expectations.push(expectation);
1322
1325
  return {
1323
- respond: function(status, data, headers) {
1324
- expectation.response = createResponse(status, data, headers);
1326
+ respond: function (status, data, headers, statusText) {
1327
+ expectation.response = createResponse(status, data, headers, statusText);
1325
1328
  }
1326
1329
  };
1327
1330
  };
@@ -1823,13 +1826,14 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
1823
1826
  * control how a matched request is handled.
1824
1827
  *
1825
1828
  * - respond –
1826
- * `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1829
+ * `{function([status,] data[, headers, statusText])
1830
+ * | function(function(method, url, data, headers)}`
1827
1831
  * – The respond method takes a set of static data to be returned or a function that can return
1828
- * an array containing response status (number), response data (string) and response headers
1829
- * (Object).
1830
- * - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
1831
- * handler will be passed through to the real backend (an XHR request will be made to the
1832
- * server.)
1832
+ * an array containing response status (number), response data (string), response headers
1833
+ * (Object), and the text for the status (string).
1834
+ * - passThrough – `{function()}` – Any request matching a backend definition with
1835
+ * `passThrough` handler will be passed through to the real backend (an XHR request will be made
1836
+ * to the server.)
1833
1837
  */
1834
1838
 
1835
1839
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.15
2
+ * @license AngularJS v1.2.16
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.2.15
2
+ * @license AngularJS v1.2.16
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.2.15
2
+ * @license AngularJS v1.2.16
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.2.15
9793
+ * @license AngularJS v1.2.16
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.2.15/' +
9863
+ message = message + '\nhttp://errors.angularjs.org/1.2.16/' +
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,8 +11381,8 @@ 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
11385
- * unspecified then the module is being retrieved for further configuration.
11384
+ <<<<<* @param {!Array.<string>=} requires If specified then new module is being created. If
11385
+ >>>>>* unspecified then the module is being retrieved for further configuration.
11386
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.
@@ -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.2.15', // all of these placeholder strings will be replaced by grunt's
11714
+ full: '1.2.16', // all of these placeholder strings will be replaced by grunt's
11715
11715
  major: 1, // package task
11716
11716
  minor: 2,
11717
- dot: 15,
11718
- codeName: 'beer-underestimating'
11717
+ dot: 16,
11718
+ codeName: 'badger-enumeration'
11719
11719
  };
11720
11720
 
11721
11721
 
@@ -12018,6 +12018,75 @@ 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, j, jj;
12048
+
12049
+ if (jqLiteIsTextNode(html)) {
12050
+ // Convert non-html into a text node
12051
+ nodes.push(context.createTextNode(html));
12052
+ } else {
12053
+ tmp = fragment.appendChild(context.createElement('div'));
12054
+ // Convert html into DOM nodes
12055
+ tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
12056
+ wrap = wrapMap[tag] || wrapMap._default;
12057
+ tmp.innerHTML = '<div>&#160;</div>' +
12058
+ wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
12059
+ tmp.removeChild(tmp.firstChild);
12060
+
12061
+ // Descend through wrappers to the right content
12062
+ i = wrap[0];
12063
+ while (i--) {
12064
+ tmp = tmp.lastChild;
12065
+ }
12066
+
12067
+ for (j=0, jj=tmp.childNodes.length; j<jj; ++j) nodes.push(tmp.childNodes[j]);
12068
+
12069
+ tmp = fragment.firstChild;
12070
+ tmp.textContent = "";
12071
+ }
12072
+
12073
+ // Remove wrapper from fragment
12074
+ fragment.textContent = "";
12075
+ fragment.innerHTML = ""; // Clear inner HTML
12076
+ return nodes;
12077
+ }
12078
+
12079
+ function jqLiteParseHTML(html, context) {
12080
+ context = context || document;
12081
+ var parsed;
12082
+
12083
+ if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
12084
+ return [context.createElement(parsed[1])];
12085
+ }
12086
+
12087
+ return jqLiteBuildFragment(html, context);
12088
+ }
12089
+
12021
12090
  /////////////////////////////////////////////
12022
12091
  function JQLite(element) {
12023
12092
  if (element instanceof JQLite) {
@@ -12034,14 +12103,9 @@ function JQLite(element) {
12034
12103
  }
12035
12104
 
12036
12105
  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);
12106
+ jqLiteAddNodes(this, jqLiteParseHTML(element));
12043
12107
  var fragment = jqLite(document.createDocumentFragment());
12044
- fragment.append(this); // detach the elements from the temporary DOM div.
12108
+ fragment.append(this);
12045
12109
  } else {
12046
12110
  jqLiteAddNodes(this, element);
12047
12111
  }
@@ -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
@@ -15853,7 +16078,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15853
16078
 
15854
16079
  if (directive.replace) {
15855
16080
  replaceDirective = directive;
15856
- $template = directiveTemplateContents(directiveValue);
16081
+ if (jqLiteIsTextNode(directiveValue)) {
16082
+ $template = [];
16083
+ } else {
16084
+ $template = jqLite(directiveValue);
16085
+ }
15857
16086
  compileNode = $template[0];
15858
16087
 
15859
16088
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -16252,27 +16481,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16252
16481
  }
16253
16482
 
16254
16483
 
16255
- function directiveTemplateContents(template) {
16256
- var type;
16257
- template = trim(template);
16258
- if ((type = TABLE_CONTENT_REGEXP.exec(template))) {
16259
- type = type[1].toLowerCase();
16260
- var table = jqLite('<table>' + template + '</table>');
16261
- if (/(thead|tbody|tfoot)/.test(type)) {
16262
- return table.children(type);
16263
- }
16264
- table = table.children('tbody');
16265
- if (type === 'tr') {
16266
- return table.children('tr');
16267
- }
16268
- return table.children('tr').contents();
16269
- }
16270
- return jqLite('<div>' +
16271
- template +
16272
- '</div>').contents();
16273
- }
16274
-
16275
-
16276
16484
  function compileTemplateUrl(directives, $compileNode, tAttrs,
16277
16485
  $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
16278
16486
  var linkQueue = [],
@@ -16297,7 +16505,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
16297
16505
  content = denormalizeTemplate(content);
16298
16506
 
16299
16507
  if (origAsyncDirective.replace) {
16300
- $template = directiveTemplateContents(content);
16508
+ if (jqLiteIsTextNode(content)) {
16509
+ $template = [];
16510
+ } else {
16511
+ $template = jqLite(content);
16512
+ }
16301
16513
  compileNode = $template[0];
16302
16514
 
16303
16515
  if ($template.length != 1 || compileNode.nodeType !== 1) {
@@ -17075,7 +17287,7 @@ function $HttpProvider() {
17075
17287
  *
17076
17288
  * ```
17077
17289
  * module.run(function($http) {
17078
- * $http.defaults.headers.common.Authentication = 'Basic YmVlcDpib29w'
17290
+ * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
17079
17291
  * });
17080
17292
  * ```
17081
17293
  *
@@ -17369,6 +17581,7 @@ function $HttpProvider() {
17369
17581
  * - **status** – `{number}` – HTTP status code of the response.
17370
17582
  * - **headers** – `{function([headerName])}` – Header getter function.
17371
17583
  * - **config** – `{Object}` – The configuration object that was used to generate the request.
17584
+ * - **statusText** – `{string}` – HTTP status text of the response.
17372
17585
  *
17373
17586
  * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
17374
17587
  * requests. This is primarily meant to be used for debugging purposes.
@@ -17743,9 +17956,9 @@ function $HttpProvider() {
17743
17956
  } else {
17744
17957
  // serving from cache
17745
17958
  if (isArray(cachedResp)) {
17746
- resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));
17959
+ resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]), cachedResp[3]);
17747
17960
  } else {
17748
- resolvePromise(cachedResp, 200, {});
17961
+ resolvePromise(cachedResp, 200, {}, 'OK');
17749
17962
  }
17750
17963
  }
17751
17964
  } else {
@@ -17769,17 +17982,17 @@ function $HttpProvider() {
17769
17982
  * - resolves the raw $http promise
17770
17983
  * - calls $apply
17771
17984
  */
17772
- function done(status, response, headersString) {
17985
+ function done(status, response, headersString, statusText) {
17773
17986
  if (cache) {
17774
17987
  if (isSuccess(status)) {
17775
- cache.put(url, [status, response, parseHeaders(headersString)]);
17988
+ cache.put(url, [status, response, parseHeaders(headersString), statusText]);
17776
17989
  } else {
17777
17990
  // remove promise from the cache
17778
17991
  cache.remove(url);
17779
17992
  }
17780
17993
  }
17781
17994
 
17782
- resolvePromise(response, status, headersString);
17995
+ resolvePromise(response, status, headersString, statusText);
17783
17996
  if (!$rootScope.$$phase) $rootScope.$apply();
17784
17997
  }
17785
17998
 
@@ -17787,7 +18000,7 @@ function $HttpProvider() {
17787
18000
  /**
17788
18001
  * Resolves the raw $http promise.
17789
18002
  */
17790
- function resolvePromise(response, status, headers) {
18003
+ function resolvePromise(response, status, headers, statusText) {
17791
18004
  // normalize internal statuses to 0
17792
18005
  status = Math.max(status, 0);
17793
18006
 
@@ -17795,7 +18008,8 @@ function $HttpProvider() {
17795
18008
  data: response,
17796
18009
  status: status,
17797
18010
  headers: headersGetter(headers),
17798
- config: config
18011
+ config: config,
18012
+ statusText : statusText
17799
18013
  });
17800
18014
  }
17801
18015
 
@@ -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
  };
@@ -19021,8 +19237,7 @@ function locationGetterSetter(property, preprocess) {
19021
19237
  * - Clicks on a link.
19022
19238
  * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
19023
19239
  *
19024
- * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular
19025
- * Services: Using $location}
19240
+ * For more information see {@link guide/$location Developer Guide: Using $location}
19026
19241
  */
19027
19242
 
19028
19243
  /**
@@ -19758,7 +19973,11 @@ var Parser = function (lexer, $filter, options) {
19758
19973
  this.options = options;
19759
19974
  };
19760
19975
 
19761
- Parser.ZERO = function () { return 0; };
19976
+ Parser.ZERO = extend(function () {
19977
+ return 0;
19978
+ }, {
19979
+ constant: true
19980
+ });
19762
19981
 
19763
19982
  Parser.prototype = {
19764
19983
  constructor: Parser,
@@ -21503,7 +21722,8 @@ function $RootScopeProvider(){
21503
21722
  * - `function(newValue, oldValue, scope)`: called with current and previous values as
21504
21723
  * parameters.
21505
21724
  *
21506
- * @param {boolean=} objectEquality Compare object for equality rather than for reference.
21725
+ * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
21726
+ * comparing for reference equality.
21507
21727
  * @returns {function()} Returns a deregistration function for this listener.
21508
21728
  */
21509
21729
  $watch: function(watchExp, listener, objectEquality) {
@@ -21924,15 +22144,32 @@ function $RootScopeProvider(){
21924
22144
 
21925
22145
  forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));
21926
22146
 
22147
+ // sever all the references to parent scopes (after this cleanup, the current scope should
22148
+ // not be retained by any of our references and should be eligible for garbage collection)
21927
22149
  if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
21928
22150
  if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
21929
22151
  if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
21930
22152
  if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
21931
22153
 
21932
- // This is bogus code that works around Chrome's GC leak
21933
- // see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
22154
+
22155
+ // All of the code below is bogus code that works around V8's memory leak via optimized code
22156
+ // and inline caches.
22157
+ //
22158
+ // see:
22159
+ // - https://code.google.com/p/v8/issues/detail?id=2073#c26
22160
+ // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
22161
+ // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
22162
+
21934
22163
  this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
21935
- this.$$childTail = null;
22164
+ this.$$childTail = this.$root = null;
22165
+
22166
+ // don't reset these to null in case some async task tries to register a listener/watch/task
22167
+ this.$$listeners = {};
22168
+ this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];
22169
+
22170
+ // prevent NPEs since these methods have references to properties we nulled out
22171
+ this.$destroy = this.$digest = this.$apply = noop;
22172
+ this.$on = this.$watch = function() { return noop; };
21936
22173
  },
21937
22174
 
21938
22175
  /**
@@ -22901,7 +23138,7 @@ function $SceDelegateProvider() {
22901
23138
  * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. |
22902
23139
  * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
22903
23140
  * | `$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. |
22904
- * | `$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. |
23141
+ * | `$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. |
22905
23142
  * | `$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. |
22906
23143
  *
22907
23144
  * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
@@ -24719,7 +24956,7 @@ function limitToFilter(){
24719
24956
  * - `Array`: An array of function or string predicates. The first predicate in the array
24720
24957
  * is used for sorting, but when two items are equivalent, the next predicate is used.
24721
24958
  *
24722
- * @param {boolean=} reverse Reverse the order the array.
24959
+ * @param {boolean=} reverse Reverse the order of the array.
24723
24960
  * @returns {Array} Sorted copy of the source array.
24724
24961
  *
24725
24962
  * @example
@@ -25484,6 +25721,10 @@ function FormController(element, attrs, $scope, $animate) {
25484
25721
  * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
25485
25722
  * sub-group of controls needs to be determined.
25486
25723
  *
25724
+ * Note: the purpose of `ngForm` is to group controls,
25725
+ * but not to be a replacement for the `<form>` tag with all of its capabilities
25726
+ * (e.g. posting to the server, ...).
25727
+ *
25487
25728
  * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
25488
25729
  * related scope, under this name.
25489
25730
  *
@@ -26140,7 +26381,6 @@ function addNativeHtml5Validators(ctrl, validatorName, element) {
26140
26381
  return value;
26141
26382
  };
26142
26383
  ctrl.$parsers.push(validator);
26143
- ctrl.$formatters.push(validator);
26144
26384
  }
26145
26385
  }
26146
26386
 
@@ -27467,7 +27707,7 @@ var ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {
27467
27707
 
27468
27708
  function classDirective(name, selector) {
27469
27709
  name = 'ngClass' + name;
27470
- return function() {
27710
+ return ['$animate', function($animate) {
27471
27711
  return {
27472
27712
  restrict: 'AC',
27473
27713
  link: function(scope, element, attr) {
@@ -27485,46 +27725,100 @@ function classDirective(name, selector) {
27485
27725
  // jshint bitwise: false
27486
27726
  var mod = $index & 1;
27487
27727
  if (mod !== old$index & 1) {
27488
- var classes = flattenClasses(scope.$eval(attr[name]));
27728
+ var classes = arrayClasses(scope.$eval(attr[name]));
27489
27729
  mod === selector ?
27490
- attr.$addClass(classes) :
27491
- attr.$removeClass(classes);
27730
+ addClasses(classes) :
27731
+ removeClasses(classes);
27732
+ }
27733
+ });
27734
+ }
27735
+
27736
+ function addClasses(classes) {
27737
+ var newClasses = digestClassCounts(classes, 1);
27738
+ attr.$addClass(newClasses);
27739
+ }
27740
+
27741
+ function removeClasses(classes) {
27742
+ var newClasses = digestClassCounts(classes, -1);
27743
+ attr.$removeClass(newClasses);
27744
+ }
27745
+
27746
+ function digestClassCounts (classes, count) {
27747
+ var classCounts = element.data('$classCounts') || {};
27748
+ var classesToUpdate = [];
27749
+ forEach(classes, function (className) {
27750
+ if (count > 0 || classCounts[className]) {
27751
+ classCounts[className] = (classCounts[className] || 0) + count;
27752
+ if (classCounts[className] === +(count > 0)) {
27753
+ classesToUpdate.push(className);
27754
+ }
27492
27755
  }
27493
27756
  });
27757
+ element.data('$classCounts', classCounts);
27758
+ return classesToUpdate.join(' ');
27494
27759
  }
27495
27760
 
27761
+ function updateClasses (oldClasses, newClasses) {
27762
+ var toAdd = arrayDifference(newClasses, oldClasses);
27763
+ var toRemove = arrayDifference(oldClasses, newClasses);
27764
+ toRemove = digestClassCounts(toRemove, -1);
27765
+ toAdd = digestClassCounts(toAdd, 1);
27766
+
27767
+ if (toAdd.length === 0) {
27768
+ $animate.removeClass(element, toRemove);
27769
+ } else if (toRemove.length === 0) {
27770
+ $animate.addClass(element, toAdd);
27771
+ } else {
27772
+ $animate.setClass(element, toAdd, toRemove);
27773
+ }
27774
+ }
27496
27775
 
27497
27776
  function ngClassWatchAction(newVal) {
27498
27777
  if (selector === true || scope.$index % 2 === selector) {
27499
- var newClasses = flattenClasses(newVal || '');
27500
- if(!oldVal) {
27501
- attr.$addClass(newClasses);
27502
- } else if(!equals(newVal,oldVal)) {
27503
- attr.$updateClass(newClasses, flattenClasses(oldVal));
27778
+ var newClasses = arrayClasses(newVal || []);
27779
+ if (!oldVal) {
27780
+ addClasses(newClasses);
27781
+ } else if (!equals(newVal,oldVal)) {
27782
+ var oldClasses = arrayClasses(oldVal);
27783
+ updateClasses(oldClasses, newClasses);
27504
27784
  }
27505
27785
  }
27506
27786
  oldVal = copy(newVal);
27507
27787
  }
27788
+ }
27789
+ };
27508
27790
 
27791
+ function arrayDifference(tokens1, tokens2) {
27792
+ var values = [];
27509
27793
 
27510
- function flattenClasses(classVal) {
27511
- if(isArray(classVal)) {
27512
- return classVal.join(' ');
27513
- } else if (isObject(classVal)) {
27514
- var classes = [], i = 0;
27515
- forEach(classVal, function(v, k) {
27516
- if (v) {
27517
- classes.push(k);
27518
- }
27519
- });
27520
- return classes.join(' ');
27521
- }
27522
-
27523
- return classVal;
27794
+ outer:
27795
+ for(var i = 0; i < tokens1.length; i++) {
27796
+ var token = tokens1[i];
27797
+ for(var j = 0; j < tokens2.length; j++) {
27798
+ if(token == tokens2[j]) continue outer;
27524
27799
  }
27800
+ values.push(token);
27525
27801
  }
27526
- };
27527
- };
27802
+ return values;
27803
+ }
27804
+
27805
+ function arrayClasses (classVal) {
27806
+ if (isArray(classVal)) {
27807
+ return classVal;
27808
+ } else if (isString(classVal)) {
27809
+ return classVal.split(' ');
27810
+ } else if (isObject(classVal)) {
27811
+ var classes = [], i = 0;
27812
+ forEach(classVal, function(v, k) {
27813
+ if (v) {
27814
+ classes.push(k);
27815
+ }
27816
+ });
27817
+ return classes;
27818
+ }
27819
+ return classVal;
27820
+ }
27821
+ }];
27528
27822
  }
27529
27823
 
27530
27824
  /**
@@ -28085,7 +28379,7 @@ var ngControllerDirective = [function() {
28085
28379
  * @element ANY
28086
28380
  * @priority 0
28087
28381
  * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
28088
- * click. (Event object is available as `$event`)
28382
+ * click. ({@link guide/expression#-event- Event object is available as `$event`})
28089
28383
  *
28090
28384
  * @example
28091
28385
  <example>
@@ -28166,7 +28460,7 @@ forEach(
28166
28460
  * @element ANY
28167
28461
  * @priority 0
28168
28462
  * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
28169
- * mousedown. (Event object is available as `$event`)
28463
+ * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
28170
28464
  *
28171
28465
  * @example
28172
28466
  <example>
@@ -28190,7 +28484,7 @@ forEach(
28190
28484
  * @element ANY
28191
28485
  * @priority 0
28192
28486
  * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
28193
- * mouseup. (Event object is available as `$event`)
28487
+ * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
28194
28488
  *
28195
28489
  * @example
28196
28490
  <example>
@@ -28213,7 +28507,7 @@ forEach(
28213
28507
  * @element ANY
28214
28508
  * @priority 0
28215
28509
  * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
28216
- * mouseover. (Event object is available as `$event`)
28510
+ * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
28217
28511
  *
28218
28512
  * @example
28219
28513
  <example>
@@ -28237,7 +28531,7 @@ forEach(
28237
28531
  * @element ANY
28238
28532
  * @priority 0
28239
28533
  * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
28240
- * mouseenter. (Event object is available as `$event`)
28534
+ * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
28241
28535
  *
28242
28536
  * @example
28243
28537
  <example>
@@ -28261,7 +28555,7 @@ forEach(
28261
28555
  * @element ANY
28262
28556
  * @priority 0
28263
28557
  * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
28264
- * mouseleave. (Event object is available as `$event`)
28558
+ * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
28265
28559
  *
28266
28560
  * @example
28267
28561
  <example>
@@ -28285,7 +28579,7 @@ forEach(
28285
28579
  * @element ANY
28286
28580
  * @priority 0
28287
28581
  * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
28288
- * mousemove. (Event object is available as `$event`)
28582
+ * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
28289
28583
  *
28290
28584
  * @example
28291
28585
  <example>
@@ -28352,7 +28646,8 @@ forEach(
28352
28646
  *
28353
28647
  * @element ANY
28354
28648
  * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
28355
- * keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
28649
+ * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
28650
+ * and can be interrogated for keyCode, altKey, etc.)
28356
28651
  *
28357
28652
  * @example
28358
28653
  <example>
@@ -28377,7 +28672,8 @@ forEach(
28377
28672
  *
28378
28673
  * @element form
28379
28674
  * @priority 0
28380
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)
28675
+ * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
28676
+ * ({@link guide/expression#-event- Event object is available as `$event`})
28381
28677
  *
28382
28678
  * @example
28383
28679
  <example>
@@ -28428,7 +28724,7 @@ forEach(
28428
28724
  * @element window, input, select, textarea, a
28429
28725
  * @priority 0
28430
28726
  * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
28431
- * focus. (Event object is available as `$event`)
28727
+ * focus. ({@link guide/expression#-event- Event object is available as `$event`})
28432
28728
  *
28433
28729
  * @example
28434
28730
  * See {@link ng.directive:ngClick ngClick}
@@ -28444,7 +28740,7 @@ forEach(
28444
28740
  * @element window, input, select, textarea, a
28445
28741
  * @priority 0
28446
28742
  * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
28447
- * blur. (Event object is available as `$event`)
28743
+ * blur. ({@link guide/expression#-event- Event object is available as `$event`})
28448
28744
  *
28449
28745
  * @example
28450
28746
  * See {@link ng.directive:ngClick ngClick}
@@ -28460,7 +28756,7 @@ forEach(
28460
28756
  * @element window, input, select, textarea, a
28461
28757
  * @priority 0
28462
28758
  * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
28463
- * copy. (Event object is available as `$event`)
28759
+ * copy. ({@link guide/expression#-event- Event object is available as `$event`})
28464
28760
  *
28465
28761
  * @example
28466
28762
  <example>
@@ -28481,7 +28777,7 @@ forEach(
28481
28777
  * @element window, input, select, textarea, a
28482
28778
  * @priority 0
28483
28779
  * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
28484
- * cut. (Event object is available as `$event`)
28780
+ * cut. ({@link guide/expression#-event- Event object is available as `$event`})
28485
28781
  *
28486
28782
  * @example
28487
28783
  <example>
@@ -28502,7 +28798,7 @@ forEach(
28502
28798
  * @element window, input, select, textarea, a
28503
28799
  * @priority 0
28504
28800
  * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
28505
- * paste. (Event object is available as `$event`)
28801
+ * paste. ({@link guide/expression#-event- Event object is available as `$event`})
28506
28802
  *
28507
28803
  * @example
28508
28804
  <example>
@@ -29775,7 +30071,7 @@ var ngShowDirective = ['$animate', function($animate) {
29775
30071
  * in AngularJS and sets the display style to none (using an !important flag).
29776
30072
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
29777
30073
  *
29778
- * ```hrml
30074
+ * ```html
29779
30075
  * <!-- when $scope.myValue is truthy (element is hidden) -->
29780
30076
  * <div ng-hide="myValue"></div>
29781
30077
  *