summaryrefslogtreecommitdiffstats
path: root/js/vendor/angular/angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/angular/angular.js')
-rw-r--r--js/vendor/angular/angular.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/js/vendor/angular/angular.js b/js/vendor/angular/angular.js
index 49cda979d..54600a256 100644
--- a/js/vendor/angular/angular.js
+++ b/js/vendor/angular/angular.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.0-build.3936+sha.73f3515
+ * @license AngularJS v1.4.0-build.3937+sha.171b9f7
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) {
return match;
});
- message += '\nhttp://errors.angularjs.org/1.4.0-build.3936+sha.73f3515/' +
+ message += '\nhttp://errors.angularjs.org/1.4.0-build.3937+sha.171b9f7/' +
(module ? module + '/' : '') + code;
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -2282,7 +2282,7 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.4.0-build.3936+sha.73f3515', // all of these placeholder strings will be replaced by grunt's
+ full: '1.4.0-build.3937+sha.171b9f7', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 4,
dot: 0,
@@ -24984,8 +24984,9 @@ var ngOptionsMinErr = minErr('ngOptions');
* option. See example below for demonstration.
*
* <div class="alert alert-warning">
- * **Note:** `ngModel` compares by reference, not value. This is important when binding to an
- * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).
+ * **Note:** By default, `ngModel` compares by reference, not value. This is important when binding to an
+ * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/). When using `track by`
+ * in an `ngOptions` expression, however, deep equality checks will be performed.
* </div>
*
* ## `select` **`as`**
@@ -25227,6 +25228,7 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
}
return {
+ trackBy: trackBy,
getWatchables: $parse(valuesFn, function(values) {
// Create a collection of things that we would like to watch (watchedArray)
// so that they can all be watched using a single $watchCollection
@@ -25452,8 +25454,9 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
// We also need to watch to see if the internals of the model changes, since
// ngModel only watches for object identity change
- scope.$watch(attr.ngModel, function() { ngModelCtrl.$render(); }, true);
-
+ if (ngOptions.trackBy) {
+ scope.$watch(attr.ngModel, function() { ngModelCtrl.$render(); }, true);
+ }
// ------------------------------------------------------------------ //
@@ -25595,10 +25598,13 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
// Check to see if the value has changed due to the update to the options
if (!ngModelCtrl.$isEmpty(previousValue)) {
var nextValue = selectCtrl.readValue();
- if (!equals(previousValue, nextValue)) {
+ if (ngOptions.trackBy && !equals(previousValue, nextValue) ||
+ previousValue !== nextValue) {
ngModelCtrl.$setViewValue(nextValue);
+ ngModelCtrl.$render();
}
}
+
}
}
@@ -27210,8 +27216,9 @@ var SelectController =
* option. See example below for demonstration.
*
* <div class="alert alert-warning">
- * **Note:** `ngModel` compares by reference, not value. This is important when binding to an
- * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).
+ * **Note:** By default, `ngModel` compares by reference, not value. This is important when binding to an
+ * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/). When using `track by`
+ * in an `ngOptions` expression, however, deep equality checks will be performed.
* </div>
*
*/