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

Commit 56690b5

Browse files
v1.7.8
1 parent b333e14 commit 56690b5

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed

angular.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.7.7
2+
* @license AngularJS v1.7.8
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.7/';
102+
var url = 'https://errors.angularjs.org/1.7.8/';
103103
var regex = url.replace('.', '\\.') + '[\\s\\S]*';
104104
var errRegExp = new RegExp(regex, 'g');
105105

@@ -2805,11 +2805,11 @@ function toDebugString(obj, maxDepth) {
28052805
var version = {
28062806
// These placeholder strings will be replaced by grunt's `build` task.
28072807
// They need to be double- or single-quoted.
2808-
full: '1.7.7',
2808+
full: '1.7.8',
28092809
major: 1,
28102810
minor: 7,
2811-
dot: 7,
2812-
codeName: 'kingly-exiting'
2811+
dot: 8,
2812+
codeName: 'enthusiastic-oblation'
28132813
};
28142814

28152815

@@ -2959,7 +2959,7 @@ function publishExternalAPI(angular) {
29592959
});
29602960
}
29612961
])
2962-
.info({ angularVersion: '1.7.7' });
2962+
.info({ angularVersion: '1.7.8' });
29632963
}
29642964

29652965
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -35899,15 +35899,21 @@ var requiredDirective = ['$parse', function($parse) {
3589935899
require: '?ngModel',
3590035900
link: function(scope, elm, attr, ctrl) {
3590135901
if (!ctrl) return;
35902-
var value = attr.required || $parse(attr.ngRequired)(scope);
35902+
// For boolean attributes like required, presence means true
35903+
var value = attr.hasOwnProperty('required') || $parse(attr.ngRequired)(scope);
3590335904

35904-
attr.required = true; // force truthy in case we are on non input element
35905+
if (!attr.ngRequired) {
35906+
// force truthy in case we are on non input element
35907+
// (input elements do this automatically for boolean attributes like required)
35908+
attr.required = true;
35909+
}
3590535910

3590635911
ctrl.$validators.required = function(modelValue, viewValue) {
3590735912
return !value || !ctrl.$isEmpty(viewValue);
3590835913
};
3590935914

3591035915
attr.$observe('required', function(newVal) {
35916+
3591135917
if (value !== newVal) {
3591235918
value = newVal;
3591335919
ctrl.$validate();

0 commit comments

Comments
 (0)