angularjs-rails 1.2.22 → 1.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 649f17ca80321144324cca4ae9bb9feb10bfdfa7
4
- data.tar.gz: 66f31ac37434d76ebaf6d4e2247b3d84731c9947
3
+ metadata.gz: 22a02c7166df12ce4d4bba554f460a9364498e95
4
+ data.tar.gz: 357db766a4b59bc5bcd83ef50d348f46dfce73e5
5
5
  SHA512:
6
- metadata.gz: 4597d4e60774c5f3ae525efae1938f0f9d00abb4863742d117bccf0a97797803a766c7e5c9e4c5abf0bcb29d64398c97d874c7be263f24e51fa4848a15ff1027
7
- data.tar.gz: 1317b9faa6e5c66f713454010b50867d6f1eb6936d7f71488f299119d8d894ea1c376a910a8c9f650c9b0a59e971e303c6e1b5bda075b68e740547268a8f757a
6
+ metadata.gz: 266734323960a9c09bdbaed3ba4504481446db1fa95f68f88c780ae62fec2d19c68500d32e126c2851e6b9ae9305d5bdd4e1a8464a4b97c453a4e881a6cbd2c5
7
+ data.tar.gz: 9d0ac0816788e21338ce9d812ff33e830d8303c4783de146a20b6a48ef44532fdec92ef77b545ed6cc1c8b1e4b9a727097d3cb8385c52af076150cf69d9469cd
@@ -1,6 +1,6 @@
1
1
  module AngularJS
2
2
  module Rails
3
- VERSION = "1.2.22"
4
- UNSTABLE_VERSION = "1.3.0-beta.18"
3
+ VERSION = "1.2.25"
4
+ UNSTABLE_VERSION = "1.3.0-rc.3"
5
5
  end
6
6
  end
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.22
2
+ * @license AngularJS v1.2.25
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.22
2
+ * @license AngularJS v1.2.25
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.22
2
+ * @license AngularJS v1.2.25
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.22/' +
72
+ message = message + '\nhttp://errors.angularjs.org/1.2.25/' +
73
73
  (module ? module + '/' : '') + code;
74
74
  for (i = 2; i < arguments.length; i++) {
75
75
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -194,7 +194,7 @@ function setupModuleLoader(window) {
194
194
  * @ngdoc property
195
195
  * @name angular.Module#requires
196
196
  * @module ng
197
- * @returns {Array.<string>} List of module names which must be loaded before this module.
197
+ *
198
198
  * @description
199
199
  * Holds the list of modules which the injector will load before the current module is
200
200
  * loaded.
@@ -205,8 +205,9 @@ function setupModuleLoader(window) {
205
205
  * @ngdoc property
206
206
  * @name angular.Module#name
207
207
  * @module ng
208
- * @returns {string} Name of the module.
208
+ *
209
209
  * @description
210
+ * Name of the module.
210
211
  */
211
212
  name: name,
212
213
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.22
2
+ * @license AngularJS v1.2.25
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -63,6 +63,8 @@ angular.mock.$Browser = function() {
63
63
  return listener;
64
64
  };
65
65
 
66
+ self.$$checkUrlChange = angular.noop;
67
+
66
68
  self.cookieHash = {};
67
69
  self.lastCookieHash = {};
68
70
  self.deferredFns = [];
@@ -2003,6 +2005,7 @@ if(window.jasmine || window.mocha) {
2003
2005
  * @description
2004
2006
  *
2005
2007
  * *NOTE*: This function is also published on window for easy access.<br>
2008
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
2006
2009
  *
2007
2010
  * This function registers a module configuration code. It collects the configuration information
2008
2011
  * which will be used when the injector is created by {@link angular.mock.inject inject}.
@@ -2045,6 +2048,7 @@ if(window.jasmine || window.mocha) {
2045
2048
  * @description
2046
2049
  *
2047
2050
  * *NOTE*: This function is also published on window for easy access.<br>
2051
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
2048
2052
  *
2049
2053
  * The inject function wraps a function into an injectable function. The inject() creates new
2050
2054
  * instance of {@link auto.$injector $injector} per test, which is then used for
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.22
2
+ * @license AngularJS v1.2.25
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -129,10 +129,16 @@ function shallowClearAndCopy(src, dst) {
129
129
  * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
130
130
  * transform function or an array of such functions. The transform function takes the http
131
131
  * request body and headers and returns its transformed (typically serialized) version.
132
+ * By default, transformRequest will contain one function that checks if the request data is
133
+ * an object and serializes to using `angular.toJson`. To prevent this behavior, set
134
+ * `transformRequest` to an empty array: `transformRequest: []`
132
135
  * - **`transformResponse`** –
133
136
  * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
134
137
  * transform function or an array of such functions. The transform function takes the http
135
138
  * response body and headers and returns its transformed (typically deserialized) version.
139
+ * By default, transformResponse will contain one function that checks if the response looks like
140
+ * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set
141
+ * `transformResponse` to an empty array: `transformResponse: []`
136
142
  * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
137
143
  * GET request, otherwise if a cache instance built with
138
144
  * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.22
2
+ * @license AngularJS v1.2.25
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -771,7 +771,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
771
771
  controllerAs: 'chapter'
772
772
  });
773
773
 
774
- // configure html5 to get links working on jsfiddle
775
774
  $locationProvider.html5Mode(true);
776
775
  }])
777
776
  .controller('MainCtrl', ['$route', '$routeParams', '$location',
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license AngularJS v1.2.22
2
+ * @license AngularJS v1.2.25
3
3
  * (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  * License: MIT
5
5
  */
@@ -597,7 +597,7 @@ angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);
597
597
  */
598
598
  angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
599
599
  var LINKY_URL_REGEXP =
600
- /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,
600
+ /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,
601
601
  MAILTO_REGEXP = /^mailto:/;
602
602
 
603
603
  return function(text, target) {
@@ -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.22
9793
+ * @license AngularJS v1.2.25
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.22/' +
9863
+ message = message + '\nhttp://errors.angularjs.org/1.2.25/' +
9864
9864
  (module ? module + '/' : '') + code;
9865
9865
  for (i = 2; i < arguments.length; i++) {
9866
9866
  message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
@@ -10691,9 +10691,13 @@ function copy(source, destination, stackSource, stackDest) {
10691
10691
  }
10692
10692
  } else {
10693
10693
  var h = destination.$$hashKey;
10694
- forEach(destination, function(value, key) {
10695
- delete destination[key];
10696
- });
10694
+ if (isArray(destination)) {
10695
+ destination.length = 0;
10696
+ } else {
10697
+ forEach(destination, function(value, key) {
10698
+ delete destination[key];
10699
+ });
10700
+ }
10697
10701
  for ( var key in source) {
10698
10702
  result = copy(source[key], null, stackSource, stackDest);
10699
10703
  if (isObject(source[key])) {
@@ -10778,7 +10782,8 @@ function equals(o1, o2) {
10778
10782
  return true;
10779
10783
  }
10780
10784
  } else if (isDate(o1)) {
10781
- return isDate(o2) && o1.getTime() == o2.getTime();
10785
+ if (!isDate(o2)) return false;
10786
+ return (isNaN(o1.getTime()) && isNaN(o2.getTime())) || (o1.getTime() === o2.getTime());
10782
10787
  } else if (isRegExp(o1) && isRegExp(o2)) {
10783
10788
  return o1.toString() == o2.toString();
10784
10789
  } else {
@@ -11216,7 +11221,11 @@ function bootstrap(element, modules) {
11216
11221
 
11217
11222
  if (element.injector()) {
11218
11223
  var tag = (element[0] === document) ? 'document' : startingTag(element);
11219
- throw ngMinErr('btstrpd', "App Already Bootstrapped with this Element '{0}'", tag);
11224
+ //Encode angle brackets to prevent input from being sanitized to empty string #8683
11225
+ throw ngMinErr(
11226
+ 'btstrpd',
11227
+ "App Already Bootstrapped with this Element '{0}'",
11228
+ tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
11220
11229
  }
11221
11230
 
11222
11231
  modules = modules || [];
@@ -11480,7 +11489,7 @@ function setupModuleLoader(window) {
11480
11489
  * @ngdoc property
11481
11490
  * @name angular.Module#requires
11482
11491
  * @module ng
11483
- * @returns {Array.<string>} List of module names which must be loaded before this module.
11492
+ *
11484
11493
  * @description
11485
11494
  * Holds the list of modules which the injector will load before the current module is
11486
11495
  * loaded.
@@ -11491,8 +11500,9 @@ function setupModuleLoader(window) {
11491
11500
  * @ngdoc property
11492
11501
  * @name angular.Module#name
11493
11502
  * @module ng
11494
- * @returns {string} Name of the module.
11503
+ *
11495
11504
  * @description
11505
+ * Name of the module.
11496
11506
  */
11497
11507
  name: name,
11498
11508
 
@@ -11769,11 +11779,11 @@ function setupModuleLoader(window) {
11769
11779
  * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
11770
11780
  */
11771
11781
  var version = {
11772
- full: '1.2.22', // all of these placeholder strings will be replaced by grunt's
11782
+ full: '1.2.25', // all of these placeholder strings will be replaced by grunt's
11773
11783
  major: 1, // package task
11774
11784
  minor: 2,
11775
- dot: 22,
11776
- codeName: 'finicky-pleasure'
11785
+ dot: 25,
11786
+ codeName: 'hypnotic-gesticulation'
11777
11787
  };
11778
11788
 
11779
11789
 
@@ -14364,6 +14374,13 @@ function Browser(window, document, $log, $sniffer) {
14364
14374
  return callback;
14365
14375
  };
14366
14376
 
14377
+ /**
14378
+ * Checks whether the url has changed outside of Angular.
14379
+ * Needs to be exported to be able to check for changes that have been done in sync,
14380
+ * as hashchange/popstate events fire in async.
14381
+ */
14382
+ self.$$checkUrlChange = fireUrlChange;
14383
+
14367
14384
  //////////////////////////////////////////////////////////////
14368
14385
  // Misc API
14369
14386
  //////////////////////////////////////////////////////////////
@@ -14580,8 +14597,10 @@ function $BrowserProvider(){
14580
14597
  $scope.keys = [];
14581
14598
  $scope.cache = $cacheFactory('cacheId');
14582
14599
  $scope.put = function(key, value) {
14583
- $scope.cache.put(key, value);
14584
- $scope.keys.push(key);
14600
+ if ($scope.cache.get(key) === undefined) {
14601
+ $scope.keys.push(key);
14602
+ }
14603
+ $scope.cache.put(key, value === undefined ? null : value);
14585
14604
  };
14586
14605
  }]);
14587
14606
  </file>
@@ -15101,9 +15120,9 @@ function $TemplateCacheProvider() {
15101
15120
  *
15102
15121
  * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
15103
15122
  * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
15104
- * * `^` - Locate the required controller by searching the element's parents. Throw an error if not found.
15105
- * * `?^` - Attempt to locate the required controller by searching the element's parents or pass `null` to the
15106
- * `link` fn if not found.
15123
+ * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
15124
+ * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
15125
+ * `null` to the `link` fn if not found.
15107
15126
  *
15108
15127
  *
15109
15128
  * #### `controllerAs`
@@ -16921,8 +16940,10 @@ function directiveNormalize(name) {
16921
16940
  /**
16922
16941
  * @ngdoc property
16923
16942
  * @name $compile.directive.Attributes#$attr
16924
- * @returns {object} A map of DOM element attribute names to the normalized name. This is
16925
- * needed to do reverse lookup from normalized name back to actual name.
16943
+ *
16944
+ * @description
16945
+ * A map of DOM element attribute names to the normalized name. This is
16946
+ * needed to do reverse lookup from normalized name back to actual name.
16926
16947
  */
16927
16948
 
16928
16949
 
@@ -17677,7 +17698,7 @@ function $HttpProvider() {
17677
17698
  * that only JavaScript running on your domain could have sent the request. The token must be
17678
17699
  * unique for each user and must be verifiable by the server (to prevent the JavaScript from
17679
17700
  * making up its own tokens). We recommend that the token is a digest of your site's
17680
- * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))
17701
+ * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)
17681
17702
  * for added security.
17682
17703
  *
17683
17704
  * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
@@ -18185,7 +18206,7 @@ function $HttpProvider() {
18185
18206
  if (isObject(v)) {
18186
18207
  if (isDate(v)){
18187
18208
  v = v.toISOString();
18188
- } else if (isObject(v)) {
18209
+ } else {
18189
18210
  v = toJson(v);
18190
18211
  }
18191
18212
  }
@@ -18635,7 +18656,7 @@ function $InterpolateProvider() {
18635
18656
  * @description
18636
18657
  * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
18637
18658
  *
18638
- * Use {@link ng.$interpolateProvider#startSymbol $interpolateProvider#startSymbol} to change
18659
+ * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change
18639
18660
  * the symbol.
18640
18661
  *
18641
18662
  * @returns {string} start symbol.
@@ -18651,7 +18672,7 @@ function $InterpolateProvider() {
18651
18672
  * @description
18652
18673
  * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
18653
18674
  *
18654
- * Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change
18675
+ * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change
18655
18676
  * the symbol.
18656
18677
  *
18657
18678
  * @returns {string} end symbol.
@@ -18743,7 +18764,7 @@ function $IntervalProvider() {
18743
18764
  * };
18744
18765
  *
18745
18766
  * $scope.$on('$destroy', function() {
18746
- * // Make sure that the interval nis destroyed too
18767
+ * // Make sure that the interval is destroyed too
18747
18768
  * $scope.stopFight();
18748
18769
  * });
18749
18770
  * }])
@@ -19241,17 +19262,16 @@ LocationHashbangInHtml5Url.prototype =
19241
19262
  * Change path, search and hash, when called with parameter and return `$location`.
19242
19263
  *
19243
19264
  * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
19244
- * @param {string=} replace The path that will be changed
19245
19265
  * @return {string} url
19246
19266
  */
19247
- url: function(url, replace) {
19267
+ url: function(url) {
19248
19268
  if (isUndefined(url))
19249
19269
  return this.$$url;
19250
19270
 
19251
19271
  var match = PATH_MATCH.exec(url);
19252
19272
  if (match[1]) this.path(decodeURIComponent(match[1]));
19253
19273
  if (match[2] || match[1]) this.search(match[3] || '');
19254
- this.hash(match[5] || '', replace);
19274
+ this.hash(match[5] || '');
19255
19275
 
19256
19276
  return this;
19257
19277
  },
@@ -19309,10 +19329,11 @@ LocationHashbangInHtml5Url.prototype =
19309
19329
  * Note: Path should always begin with forward slash (/), this method will add the forward slash
19310
19330
  * if it is missing.
19311
19331
  *
19312
- * @param {string=} path New path
19332
+ * @param {(string|number)=} path New path
19313
19333
  * @return {string} path
19314
19334
  */
19315
19335
  path: locationGetterSetter('$$path', function(path) {
19336
+ path = path ? path.toString() : '';
19316
19337
  return path.charAt(0) == '/' ? path : '/' + path;
19317
19338
  }),
19318
19339
 
@@ -19348,7 +19369,7 @@ LocationHashbangInHtml5Url.prototype =
19348
19369
  * If the argument is a hash object containing an array of values, these values will be encoded
19349
19370
  * as duplicate search parameters in the url.
19350
19371
  *
19351
- * @param {(string|Array<string>|boolean)=} paramValue If `search` is a string, then `paramValue`
19372
+ * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
19352
19373
  * will override only a single search property.
19353
19374
  *
19354
19375
  * If `paramValue` is an array, it will override the property of the `search` component of
@@ -19367,7 +19388,8 @@ LocationHashbangInHtml5Url.prototype =
19367
19388
  case 0:
19368
19389
  return this.$$search;
19369
19390
  case 1:
19370
- if (isString(search)) {
19391
+ if (isString(search) || isNumber(search)) {
19392
+ search = search.toString();
19371
19393
  this.$$search = parseKeyValue(search);
19372
19394
  } else if (isObject(search)) {
19373
19395
  // remove object undefined or null properties
@@ -19404,10 +19426,12 @@ LocationHashbangInHtml5Url.prototype =
19404
19426
  *
19405
19427
  * Change hash fragment when called with parameter and return `$location`.
19406
19428
  *
19407
- * @param {string=} hash New hash fragment
19429
+ * @param {(string|number)=} hash New hash fragment
19408
19430
  * @return {string} hash
19409
19431
  */
19410
- hash: locationGetterSetter('$$hash', identity),
19432
+ hash: locationGetterSetter('$$hash', function(hash) {
19433
+ return hash ? hash.toString() : '';
19434
+ }),
19411
19435
 
19412
19436
  /**
19413
19437
  * @ngdoc method
@@ -19591,7 +19615,7 @@ function $LocationProvider(){
19591
19615
  // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
19592
19616
  var href = elm.attr('href') || elm.attr('xlink:href');
19593
19617
 
19594
- if (href.indexOf('://') < 0) { // Ignore absolute URLs
19618
+ if (href && href.indexOf('://') < 0) { // Ignore absolute URLs
19595
19619
  var prefix = '#' + hashPrefix;
19596
19620
  if (href[0] == '/') {
19597
19621
  // absolute path - replace old path
@@ -19603,6 +19627,7 @@ function $LocationProvider(){
19603
19627
  // relative path - join with current path
19604
19628
  var stack = $location.path().split("/"),
19605
19629
  parts = href.split("/");
19630
+ if (stack.length === 2 && !stack[1]) stack.length = 1;
19606
19631
  for (var i=0; i<parts.length; i++) {
19607
19632
  if (parts[i] == ".")
19608
19633
  continue;
@@ -20601,7 +20626,7 @@ Parser.prototype = {
20601
20626
  var context = contextGetter ? contextGetter(scope, locals) : scope;
20602
20627
 
20603
20628
  for (var i = 0; i < argsFn.length; i++) {
20604
- args.push(argsFn[i](scope, locals));
20629
+ args.push(ensureSafeObject(argsFn[i](scope, locals), parser.text));
20605
20630
  }
20606
20631
  var fnPtr = fn(scope, locals, context) || noop;
20607
20632
 
@@ -20689,13 +20714,15 @@ Parser.prototype = {
20689
20714
  //////////////////////////////////////////////////
20690
20715
 
20691
20716
  function setter(obj, path, setValue, fullExp, options) {
20717
+ ensureSafeObject(obj, fullExp);
20718
+
20692
20719
  //needed?
20693
20720
  options = options || {};
20694
20721
 
20695
20722
  var element = path.split('.'), key;
20696
20723
  for (var i = 0; element.length > 1; i++) {
20697
20724
  key = ensureSafeMemberName(element.shift(), fullExp);
20698
- var propertyObj = obj[key];
20725
+ var propertyObj = ensureSafeObject(obj[key], fullExp);
20699
20726
  if (!propertyObj) {
20700
20727
  propertyObj = {};
20701
20728
  obj[key] = propertyObj;
@@ -20715,7 +20742,6 @@ function setter(obj, path, setValue, fullExp, options) {
20715
20742
  }
20716
20743
  }
20717
20744
  key = ensureSafeMemberName(element.shift(), fullExp);
20718
- ensureSafeObject(obj, fullExp);
20719
20745
  ensureSafeObject(obj[key], fullExp);
20720
20746
  obj[key] = setValue;
20721
20747
  return setValue;
@@ -21779,10 +21805,26 @@ function $RootScopeProvider(){
21779
21805
  /**
21780
21806
  * @ngdoc property
21781
21807
  * @name $rootScope.Scope#$id
21782
- * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for
21783
- * debugging.
21808
+ *
21809
+ * @description
21810
+ * Unique scope ID (monotonically increasing) useful for debugging.
21784
21811
  */
21785
21812
 
21813
+ /**
21814
+ * @ngdoc property
21815
+ * @name $rootScope.Scope#$parent
21816
+ *
21817
+ * @description
21818
+ * Reference to the parent scope.
21819
+ */
21820
+
21821
+ /**
21822
+ * @ngdoc property
21823
+ * @name $rootScope.Scope#$root
21824
+ *
21825
+ * @description
21826
+ * Reference to the root scope.
21827
+ */
21786
21828
 
21787
21829
  Scope.prototype = {
21788
21830
  constructor: Scope,
@@ -21794,9 +21836,8 @@ function $RootScopeProvider(){
21794
21836
  * @description
21795
21837
  * Creates a new child {@link ng.$rootScope.Scope scope}.
21796
21838
  *
21797
- * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and
21798
- * {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the
21799
- * scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
21839
+ * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
21840
+ * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
21800
21841
  *
21801
21842
  * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
21802
21843
  * desired for the scope and its child scopes to be permanently detached from the parent and
@@ -22249,6 +22290,8 @@ function $RootScopeProvider(){
22249
22290
  logIdx, logMsg, asyncTask;
22250
22291
 
22251
22292
  beginPhase('$digest');
22293
+ // Check for changes to browser url that happened in sync before the call to $digest
22294
+ $browser.$$checkUrlChange();
22252
22295
 
22253
22296
  lastDirtyWatch = null;
22254
22297
 
@@ -22795,7 +22838,7 @@ function $RootScopeProvider(){
22795
22838
  */
22796
22839
  function $$SanitizeUriProvider() {
22797
22840
  var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
22798
- imgSrcSanitizationWhitelist = /^\s*(https?|ftp|file):|data:image\//;
22841
+ imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file):|data:image\/)/;
22799
22842
 
22800
22843
  /**
22801
22844
  * @description
@@ -24302,16 +24345,6 @@ function $WindowProvider(){
24302
24345
  * For more information about how angular filters work, and how to create your own filters, see
24303
24346
  * {@link guide/filter Filters} in the Angular Developer Guide.
24304
24347
  */
24305
- /**
24306
- * @ngdoc method
24307
- * @name $filterProvider#register
24308
- * @description
24309
- * Register filter factory function.
24310
- *
24311
- * @param {String} name Name of the filter.
24312
- * @param {Function} fn The filter factory function which is injectable.
24313
- */
24314
-
24315
24348
 
24316
24349
  /**
24317
24350
  * @ngdoc service
@@ -24350,7 +24383,7 @@ function $FilterProvider($provide) {
24350
24383
 
24351
24384
  /**
24352
24385
  * @ngdoc method
24353
- * @name $controllerProvider#register
24386
+ * @name $filterProvider#register
24354
24387
  * @param {string|Object} name Name of the filter function, or an object map of filters where
24355
24388
  * the keys are the filter names and the values are the filter factories.
24356
24389
  * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
@@ -24423,7 +24456,9 @@ function $FilterProvider($provide) {
24423
24456
  * which have property `name` containing "M" and property `phone` containing "1". A special
24424
24457
  * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
24425
24458
  * property of the object. That's equivalent to the simple substring match with a `string`
24426
- * as described above.
24459
+ * as described above. The predicate can be negated by prefixing the string with `!`.
24460
+ * For Example `{name: "!M"}` predicate will return an array of items which have property `name`
24461
+ * not containing "M".
24427
24462
  *
24428
24463
  * - `function(value)`: A predicate function can be used to write arbitrary filters. The function is
24429
24464
  * called for each element of `array`. The final result is an array of those elements that
@@ -24772,6 +24807,10 @@ function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
24772
24807
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
24773
24808
  number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);
24774
24809
 
24810
+ if (number === 0) {
24811
+ isNegative = false;
24812
+ }
24813
+
24775
24814
  var fraction = ('' + number).split(DECIMAL_SEP);
24776
24815
  var whole = fraction[0];
24777
24816
  fraction = fraction[1] || '';
@@ -24941,8 +24980,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
24941
24980
  * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)
24942
24981
  * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)
24943
24982
  *
24944
- * `format` string can contain literal values. These need to be quoted with single quotes (e.g.
24945
- * `"h 'in the morning'"`). In order to output single quote, use two single quotes in a sequence
24983
+ * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.
24984
+ * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence
24946
24985
  * (e.g. `"h 'o''clock'"`).
24947
24986
  *
24948
24987
  * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
@@ -24962,6 +25001,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
24962
25001
  <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
24963
25002
  <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
24964
25003
  <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
25004
+ <span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
25005
+ <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
24965
25006
  </file>
24966
25007
  <file name="protractor.js" type="protractor">
24967
25008
  it('should format date', function() {
@@ -24971,6 +25012,8 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
24971
25012
  toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
24972
25013
  expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
24973
25014
  toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
25015
+ expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
25016
+ toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
24974
25017
  });
24975
25018
  </file>
24976
25019
  </example>
@@ -25235,9 +25278,13 @@ function limitToFilter(){
25235
25278
  *
25236
25279
  * - `function`: Getter function. The result of this function will be sorted using the
25237
25280
  * `<`, `=`, `>` operator.
25238
- * - `string`: An Angular expression which evaluates to an object to order by, such as 'name'
25239
- * to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control
25240
- * ascending or descending sort order (for example, +name or -name).
25281
+ * - `string`: An Angular expression. The result of this expression is used to compare elements
25282
+ * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
25283
+ * 3 first characters of a property called `name`). The result of a constant expression
25284
+ * is interpreted as a property name to be used in comparisons (for example `"special name"`
25285
+ * to sort object by the value of their `special name` property). An expression can be
25286
+ * optionally prefixed with `+` or `-` to control ascending or descending sort order
25287
+ * (for example, `+name` or `-name`).
25241
25288
  * - `Array`: An array of function or string predicates. The first predicate in the array
25242
25289
  * is used for sorting, but when two items are equivalent, the next predicate is used.
25243
25290
  *
@@ -25328,7 +25375,7 @@ function limitToFilter(){
25328
25375
  orderByFilter.$inject = ['$parse'];
25329
25376
  function orderByFilter($parse){
25330
25377
  return function(array, sortPredicate, reverseOrder) {
25331
- if (!isArray(array)) return array;
25378
+ if (!(isArrayLike(array))) return array;
25332
25379
  if (!sortPredicate) return array;
25333
25380
  sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];
25334
25381
  sortPredicate = map(sortPredicate, function(predicate){
@@ -25605,7 +25652,7 @@ var htmlAnchorDirective = valueFn({
25605
25652
  *
25606
25653
  * @description
25607
25654
  *
25608
- * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
25655
+ * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
25609
25656
  * ```html
25610
25657
  * <div ng-init="scope = { isDisabled: false }">
25611
25658
  * <button disabled="{{scope.isDisabled}}">Disabled</button>
@@ -25825,8 +25872,12 @@ forEach(['src', 'srcset', 'href'], function(attrName) {
25825
25872
  }
25826
25873
 
25827
25874
  attr.$observe(normalized, function(value) {
25828
- if (!value)
25829
- return;
25875
+ if (!value) {
25876
+ if (attrName === 'href') {
25877
+ attr.$set(name, null);
25878
+ }
25879
+ return;
25880
+ }
25830
25881
 
25831
25882
  attr.$set(name, value);
25832
25883
 
@@ -25911,8 +25962,9 @@ function FormController(element, attrs, $scope, $animate) {
25911
25962
  // convenience method for easy toggling of classes
25912
25963
  function toggleValidCss(isValid, validationErrorKey) {
25913
25964
  validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
25914
- $animate.removeClass(element, (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
25915
- $animate.addClass(element, (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
25965
+ $animate.setClass(element,
25966
+ (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey,
25967
+ (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
25916
25968
  }
25917
25969
 
25918
25970
  /**
@@ -26127,8 +26179,6 @@ function FormController(element, attrs, $scope, $animate) {
26127
26179
  * hitting enter in any of the input fields will trigger the click handler on the *first* button or
26128
26180
  * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
26129
26181
  *
26130
- * @param {string=} name Name of the form. If specified, the form controller will be published into
26131
- * related scope, under this name.
26132
26182
  *
26133
26183
  * ## Animation Hooks
26134
26184
  *
@@ -26206,6 +26256,8 @@ function FormController(element, attrs, $scope, $animate) {
26206
26256
  </file>
26207
26257
  </example>
26208
26258
  *
26259
+ * @param {string=} name Name of the form. If specified, the form controller will be published into
26260
+ * related scope, under this name.
26209
26261
  */
26210
26262
  var formDirectiveFactory = function(isNgForm) {
26211
26263
  return ['$timeout', function($timeout) {
@@ -26284,7 +26336,9 @@ var inputType = {
26284
26336
  * @name input[text]
26285
26337
  *
26286
26338
  * @description
26287
- * Standard HTML text input with angular data binding.
26339
+ * Standard HTML text input with angular data binding, inherited by most of the `input` elements.
26340
+ *
26341
+ * *NOTE* Not every feature offered is available for all input types.
26288
26342
  *
26289
26343
  * @param {string} ngModel Assignable angular expression to data-bind to.
26290
26344
  * @param {string=} name Property name of the form under which the control is published.
@@ -26302,6 +26356,8 @@ var inputType = {
26302
26356
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
26303
26357
  * interaction with the input element.
26304
26358
  * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
26359
+ * This parameter is ignored for input[type=password] controls, which will never trim the
26360
+ * input.
26305
26361
  *
26306
26362
  * @example
26307
26363
  <example name="text-input-directive" module="textInputExample">
@@ -26741,6 +26797,7 @@ function addNativeHtml5Validators(ctrl, validatorName, badFlags, ignoreFlags, va
26741
26797
  function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
26742
26798
  var validity = element.prop(VALIDITY_STATE_PROPERTY);
26743
26799
  var placeholder = element[0].placeholder, noevent = {};
26800
+ var type = lowercase(element[0].type);
26744
26801
  ctrl.$$validityState = validity;
26745
26802
 
26746
26803
  // In composition mode, users are still inputing intermediate text buffer,
@@ -26774,8 +26831,8 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
26774
26831
 
26775
26832
  // By default we will trim the value
26776
26833
  // If the attribute ng-trim exists we will avoid trimming
26777
- // e.g. <input ng-model="foo" ng-trim="false">
26778
- if (toBoolean(attr.ngTrim || 'T')) {
26834
+ // If input type is 'password', the value is never trimmed
26835
+ if (type !== 'password' && (toBoolean(attr.ngTrim || 'T'))) {
26779
26836
  value = trim(value);
26780
26837
  }
26781
26838
 
@@ -26784,7 +26841,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
26784
26841
  // a row.
26785
26842
  var revalidate = validity && ctrl.$$hasNativeValidators;
26786
26843
  if (ctrl.$viewValue !== value || (value === '' && revalidate)) {
26787
- if (scope.$$phase) {
26844
+ if (scope.$root.$$phase) {
26788
26845
  ctrl.$setViewValue(value);
26789
26846
  } else {
26790
26847
  scope.$apply(function() {
@@ -27050,6 +27107,8 @@ function checkboxInputType(scope, element, attr, ctrl) {
27050
27107
  * HTML input element control with angular data-binding. Input control follows HTML5 input types
27051
27108
  * and polyfills the HTML5 validation behavior for older browsers.
27052
27109
  *
27110
+ * *NOTE* Not every feature offered is available for all input types.
27111
+ *
27053
27112
  * @param {string} ngModel Assignable angular expression to data-bind to.
27054
27113
  * @param {string=} name Property name of the form under which the control is published.
27055
27114
  * @param {string=} required Sets `required` validation error key if the value is not entered.
@@ -27063,6 +27122,9 @@ function checkboxInputType(scope, element, attr, ctrl) {
27063
27122
  * patterns defined as scope expressions.
27064
27123
  * @param {string=} ngChange Angular expression to be executed when input changes due to user
27065
27124
  * interaction with the input element.
27125
+ * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
27126
+ * This parameter is ignored for input[type=password] controls, which will never trim the
27127
+ * input.
27066
27128
  *
27067
27129
  * @example
27068
27130
  <example name="input-directive" module="inputExample">
@@ -28052,7 +28114,6 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
28052
28114
  * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
28053
28115
  *
28054
28116
  * @example
28055
- Try it here: enter text in text box and watch the greeting change.
28056
28117
 
28057
28118
  <example module="bindHtmlExample" deps="angular-sanitize.js">
28058
28119
  <file name="index.html">
@@ -28822,7 +28883,9 @@ var ngControllerDirective = [function() {
28822
28883
  <button ng-click="count = count + 1" ng-init="count=0">
28823
28884
  Increment
28824
28885
  </button>
28825
- count: {{count}}
28886
+ <span>
28887
+ count: {{count}}
28888
+ <span>
28826
28889
  </file>
28827
28890
  <file name="protractor.js" type="protractor">
28828
28891
  it('should check ng-click', function() {
@@ -28840,19 +28903,32 @@ var ngControllerDirective = [function() {
28840
28903
  * Events that are handled via these handler are always configured not to propagate further.
28841
28904
  */
28842
28905
  var ngEventDirectives = {};
28906
+
28907
+ // For events that might fire synchronously during DOM manipulation
28908
+ // we need to execute their event handlers asynchronously using $evalAsync,
28909
+ // so that they are not executed in an inconsistent state.
28910
+ var forceAsyncEvents = {
28911
+ 'blur': true,
28912
+ 'focus': true
28913
+ };
28843
28914
  forEach(
28844
28915
  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
28845
- function(name) {
28846
- var directiveName = directiveNormalize('ng-' + name);
28847
- ngEventDirectives[directiveName] = ['$parse', function($parse) {
28916
+ function(eventName) {
28917
+ var directiveName = directiveNormalize('ng-' + eventName);
28918
+ ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {
28848
28919
  return {
28849
28920
  compile: function($element, attr) {
28850
28921
  var fn = $parse(attr[directiveName]);
28851
28922
  return function ngEventHandler(scope, element) {
28852
- element.on(lowercase(name), function(event) {
28853
- scope.$apply(function() {
28923
+ element.on(eventName, function(event) {
28924
+ var callback = function() {
28854
28925
  fn(scope, {$event:event});
28855
- });
28926
+ };
28927
+ if (forceAsyncEvents[eventName] && $rootScope.$$phase) {
28928
+ scope.$evalAsync(callback);
28929
+ } else {
28930
+ scope.$apply(callback);
28931
+ }
28856
28932
  });
28857
28933
  };
28858
28934
  }
@@ -29169,6 +29245,10 @@ forEach(
29169
29245
  * @description
29170
29246
  * Specify custom behavior on focus event.
29171
29247
  *
29248
+ * Note: As the `focus` event is executed synchronously when calling `input.focus()`
29249
+ * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
29250
+ * during an `$apply` to ensure a consistent state.
29251
+ *
29172
29252
  * @element window, input, select, textarea, a
29173
29253
  * @priority 0
29174
29254
  * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
@@ -29185,6 +29265,14 @@ forEach(
29185
29265
  * @description
29186
29266
  * Specify custom behavior on blur event.
29187
29267
  *
29268
+ * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when
29269
+ * an element has lost focus.
29270
+ *
29271
+ * Note: As the `blur` event is executed synchronously also during DOM manipulations
29272
+ * (e.g. removing a focussed input),
29273
+ * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
29274
+ * during an `$apply` to ensure a consistent state.
29275
+ *
29188
29276
  * @element window, input, select, textarea, a
29189
29277
  * @priority 0
29190
29278
  * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
@@ -30265,8 +30353,9 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30265
30353
  if (block && block.scope) lastBlockMap[block.id] = block;
30266
30354
  });
30267
30355
  // This is a duplicate and we need to throw an error
30268
- throw ngRepeatMinErr('dupes', "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",
30269
- expression, trackById);
30356
+ throw ngRepeatMinErr('dupes',
30357
+ "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
30358
+ expression, trackById, toJson(value));
30270
30359
  } else {
30271
30360
  // new never before seen block
30272
30361
  nextBlockOrder[index] = { id: trackById };
@@ -30357,8 +30446,8 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30357
30446
  *
30358
30447
  * @description
30359
30448
  * The `ngShow` directive shows or hides the given HTML element based on the expression
30360
- * provided to the ngShow attribute. The element is shown or hidden by removing or adding
30361
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
30449
+ * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding
30450
+ * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
30362
30451
  * in AngularJS and sets the display style to none (using an !important flag).
30363
30452
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
30364
30453
  *
@@ -30370,8 +30459,8 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30370
30459
  * <div ng-show="myValue" class="ng-hide"></div>
30371
30460
  * ```
30372
30461
  *
30373
- * When the ngShow expression evaluates to false then the ng-hide CSS class is added to the class attribute
30374
- * on the element causing it to become hidden. When true, the ng-hide CSS class is removed
30462
+ * When the `ngShow` expression evaluates to false then the `.ng-hide` CSS class is added to the class attribute
30463
+ * on the element causing it to become hidden. When true, the `.ng-hide` CSS class is removed
30375
30464
  * from the element causing the element not to appear hidden.
30376
30465
  *
30377
30466
  * <div class="alert alert-warning">
@@ -30381,7 +30470,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30381
30470
  *
30382
30471
  * ## Why is !important used?
30383
30472
  *
30384
- * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector
30473
+ * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
30385
30474
  * can be easily overridden by heavier selectors. For example, something as simple
30386
30475
  * as changing the display style on a HTML list item would make hidden elements appear visible.
30387
30476
  * This also becomes a bigger issue when dealing with CSS frameworks.
@@ -30390,7 +30479,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30390
30479
  * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
30391
30480
  * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
30392
30481
  *
30393
- * ### Overriding .ng-hide
30482
+ * ### Overriding `.ng-hide`
30394
30483
  *
30395
30484
  * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
30396
30485
  * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
@@ -30408,7 +30497,7 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30408
30497
  *
30409
30498
  * By default you don't need to override in CSS anything and the animations will work around the display style.
30410
30499
  *
30411
- * ## A note about animations with ngShow
30500
+ * ## A note about animations with `ngShow`
30412
30501
  *
30413
30502
  * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
30414
30503
  * is true and false. This system works like the animation system present with ngClass except that
@@ -30433,8 +30522,8 @@ var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
30433
30522
  * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
30434
30523
  *
30435
30524
  * @animations
30436
- * addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible
30437
- * removeClass: .ng-hide - happens after the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden
30525
+ * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible
30526
+ * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
30438
30527
  *
30439
30528
  * @element ANY
30440
30529
  * @param {expression} ngShow If the {@link guide/expression expression} is truthy
@@ -30514,7 +30603,7 @@ var ngShowDirective = ['$animate', function($animate) {
30514
30603
  *
30515
30604
  * @description
30516
30605
  * The `ngHide` directive shows or hides the given HTML element based on the expression
30517
- * provided to the ngHide attribute. The element is shown or hidden by removing or adding
30606
+ * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding
30518
30607
  * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
30519
30608
  * in AngularJS and sets the display style to none (using an !important flag).
30520
30609
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
@@ -30527,8 +30616,8 @@ var ngShowDirective = ['$animate', function($animate) {
30527
30616
  * <div ng-hide="myValue"></div>
30528
30617
  * ```
30529
30618
  *
30530
- * When the ngHide expression evaluates to true then the .ng-hide CSS class is added to the class attribute
30531
- * on the element causing it to become hidden. When false, the ng-hide CSS class is removed
30619
+ * When the `.ngHide` expression evaluates to true then the `.ng-hide` CSS class is added to the class attribute
30620
+ * on the element causing it to become hidden. When false, the `.ng-hide` CSS class is removed
30532
30621
  * from the element causing the element not to appear hidden.
30533
30622
  *
30534
30623
  * <div class="alert alert-warning">
@@ -30538,7 +30627,7 @@ var ngShowDirective = ['$animate', function($animate) {
30538
30627
  *
30539
30628
  * ## Why is !important used?
30540
30629
  *
30541
- * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector
30630
+ * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
30542
30631
  * can be easily overridden by heavier selectors. For example, something as simple
30543
30632
  * as changing the display style on a HTML list item would make hidden elements appear visible.
30544
30633
  * This also becomes a bigger issue when dealing with CSS frameworks.
@@ -30547,7 +30636,7 @@ var ngShowDirective = ['$animate', function($animate) {
30547
30636
  * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
30548
30637
  * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
30549
30638
  *
30550
- * ### Overriding .ng-hide
30639
+ * ### Overriding `.ng-hide`
30551
30640
  *
30552
30641
  * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
30553
30642
  * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
@@ -30565,7 +30654,7 @@ var ngShowDirective = ['$animate', function($animate) {
30565
30654
  *
30566
30655
  * By default you don't need to override in CSS anything and the animations will work around the display style.
30567
30656
  *
30568
- * ## A note about animations with ngHide
30657
+ * ## A note about animations with `ngHide`
30569
30658
  *
30570
30659
  * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
30571
30660
  * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
@@ -30589,8 +30678,8 @@ var ngShowDirective = ['$animate', function($animate) {
30589
30678
  * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
30590
30679
  *
30591
30680
  * @animations
30592
- * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden
30593
- * addClass: .ng-hide - happens after the ngHide expression evaluates to a non truthy value and just before the contents are set to visible
30681
+ * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
30682
+ * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
30594
30683
  *
30595
30684
  * @element ANY
30596
30685
  * @param {expression} ngHide If the {@link guide/expression expression} is truthy then
@@ -31443,6 +31532,19 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
31443
31532
  ctrl.$render = render;
31444
31533
 
31445
31534
  scope.$watchCollection(valuesFn, render);
31535
+ scope.$watchCollection(function () {
31536
+ var locals = {},
31537
+ values = valuesFn(scope);
31538
+ if (values) {
31539
+ var toDisplay = new Array(values.length);
31540
+ for (var i = 0, ii = values.length; i < ii; i++) {
31541
+ locals[valueName] = values[i];
31542
+ toDisplay[i] = displayFn(scope, locals);
31543
+ }
31544
+ return toDisplay;
31545
+ }
31546
+ }, render);
31547
+
31446
31548
  if ( multiple ) {
31447
31549
  scope.$watchCollection(function() { return ctrl.$modelValue; }, render);
31448
31550
  }