Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit b333e14

Browse files
v1.7.7
1 parent 3d45fe7 commit b333e14

File tree

5 files changed

+52
-28
lines changed

5 files changed

+52
-28
lines changed

angular.js

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.7.6
2+
* @license AngularJS v1.7.7
33
* (c) 2010-2018 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -99,7 +99,7 @@ function isValidObjectMaxDepth(maxDepth) {
9999
function minErr(module, ErrorConstructor) {
100100
ErrorConstructor = ErrorConstructor || Error;
101101

102-
var url = 'https://errors.angularjs.org/1.7.6/';
102+
var url = 'https://errors.angularjs.org/1.7.7/';
103103
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
104104
var errRegExp = new RegExp(regex, 'g');
105105

@@ -535,8 +535,8 @@ function extend(dst) {
535535
* sinceVersion="1.6.5"
536536
* This function is deprecated, but will not be removed in the 1.x lifecycle.
537537
* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not
538-
* supported by this function. We suggest
539-
* using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead.
538+
* supported by this function. We suggest using another, similar library for all-purpose merging,
539+
* such as [lodash's merge()](https://lodash.com/docs/4.17.4#merge).
540540
*
541541
* @knownIssue
542542
* This is a list of (known) object types that are not handled correctly by this function:
@@ -545,6 +545,8 @@ function extend(dst) {
545545
* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)
546546
* - AngularJS {@link $rootScope.Scope scopes};
547547
*
548+
* `angular.merge` also does not support merging objects with circular references.
549+
*
548550
* @param {Object} dst Destination object.
549551
* @param {...Object} src Source object(s).
550552
* @returns {Object} Reference to `dst`.
@@ -922,7 +924,9 @@ function arrayRemove(array, value) {
922924
* @kind function
923925
*
924926
* @description
925-
* Creates a deep copy of `source`, which should be an object or an array.
927+
* Creates a deep copy of `source`, which should be an object or an array. This functions is used
928+
* internally, mostly in the change-detection code. It is not intended as an all-purpose copy
929+
* function, and has several limitations (see below).
926930
*
927931
* * If no destination is supplied, a copy of the object or array is created.
928932
* * If a destination is provided, all of its elements (for arrays) or properties (for objects)
@@ -937,6 +941,25 @@ function arrayRemove(array, value) {
937941
* and on `destination`) will be ignored.
938942
* </div>
939943
*
944+
* <div class="alert alert-warning">
945+
* `angular.copy` does not check if destination and source are of the same type. It's the
946+
* developer's responsibility to make sure they are compatible.
947+
* </div>
948+
*
949+
* @knownIssue
950+
* This is a non-exhaustive list of object types / features that are not handled correctly by
951+
* `angular.copy`. Note that since this functions is used by the change detection code, this
952+
* means binding or watching objects of these types (or that include these types) might not work
953+
* correctly.
954+
* - [`File`](https://developer.mozilla.org/docs/Web/API/File)
955+
* - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)
956+
* - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData)
957+
* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)
958+
* - [`Set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)
959+
* - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)
960+
* - ['getter'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/
961+
* [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)`
962+
*
940963
* @param {*} source The source that will be used to make a copy. Can be any type, including
941964
* primitives, `null`, and `undefined`.
942965
* @param {(Object|Array)=} destination Destination into which the source is copied. If provided,
@@ -2782,11 +2805,11 @@ function toDebugString(obj, maxDepth) {
27822805
var version = {
27832806
// These placeholder strings will be replaced by grunt's `build` task.
27842807
// They need to be double- or single-quoted.
2785-
full: '1.7.6',
2808+
full: '1.7.7',
27862809
major: 1,
27872810
minor: 7,
2788-
dot: 6,
2789-
codeName: 'gravity-manipulation'
2811+
dot: 7,
2812+
codeName: 'kingly-exiting'
27902813
};
27912814

27922815

@@ -2936,7 +2959,7 @@ function publishExternalAPI(angular) {
29362959
});
29372960
}
29382961
])
2939-
.info({ angularVersion: '1.7.6' });
2962+
.info({ angularVersion: '1.7.7' });
29402963
}
29412964

29422965
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -24158,7 +24181,6 @@ var htmlAnchorDirective = valueFn({
2415824181
</file>
2415924182
</example>
2416024183
*
24161-
* @element INPUT
2416224184
* @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
2416324185
* then the `disabled` attribute will be set on the element
2416424186
*/
@@ -26060,8 +26082,10 @@ var inputType = {
2606026082
*
2606126083
* <div class="alert alert-warning">
2606226084
* **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex
26063-
* used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can
26064-
* use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})
26085+
* used in Chromium, which may not fulfill your app's requirements.
26086+
* If you need stricter (e.g. requiring a top-level domain), or more relaxed validation
26087+
* (e.g. allowing IPv6 address literals) you can use `ng-pattern` or
26088+
* modify the built-in validators (see the {@link guide/forms Forms guide}).
2606526089
* </div>
2606626090
*
2606726091
* @param {string} ngModel Assignable AngularJS expression to data-bind to.
@@ -35875,17 +35899,17 @@ var requiredDirective = ['$parse', function($parse) {
3587535899
require: '?ngModel',
3587635900
link: function(scope, elm, attr, ctrl) {
3587735901
if (!ctrl) return;
35878-
var oldVal = attr.required || $parse(attr.ngRequired)(scope);
35902+
var value = attr.required || $parse(attr.ngRequired)(scope);
3587935903

3588035904
attr.required = true; // force truthy in case we are on non input element
3588135905

3588235906
ctrl.$validators.required = function(modelValue, viewValue) {
35883-
return !attr.required || !ctrl.$isEmpty(viewValue);
35907+
return !value || !ctrl.$isEmpty(viewValue);
3588435908
};
3588535909

35886-
attr.$observe('required', function(val) {
35887-
if (oldVal !== val) {
35888-
oldVal = val;
35910+
attr.$observe('required', function(newVal) {
35911+
if (value !== newVal) {
35912+
value = newVal;
3588935913
ctrl.$validate();
3589035914
}
3589135915
});

0 commit comments

Comments
 (0)