|
1 | 1 | /**
|
2 |
| - * @license AngularJS v1.7.7 |
| 2 | + * @license AngularJS v1.7.8 |
3 | 3 | * (c) 2010-2018 Google, Inc. http://angularjs.org
|
4 | 4 | * License: MIT
|
5 | 5 | */
|
@@ -99,7 +99,7 @@ function isValidObjectMaxDepth(maxDepth) {
|
99 | 99 | function minErr(module, ErrorConstructor) {
|
100 | 100 | ErrorConstructor = ErrorConstructor || Error;
|
101 | 101 |
|
102 |
| - var url = 'https://errors.angularjs.org/1.7.7/'; |
| 102 | + var url = 'https://errors.angularjs.org/1.7.8/'; |
103 | 103 | var regex = url.replace('.', '\\.') + '[\\s\\S]*';
|
104 | 104 | var errRegExp = new RegExp(regex, 'g');
|
105 | 105 |
|
@@ -2805,11 +2805,11 @@ function toDebugString(obj, maxDepth) {
|
2805 | 2805 | var version = {
|
2806 | 2806 | // These placeholder strings will be replaced by grunt's `build` task.
|
2807 | 2807 | // They need to be double- or single-quoted.
|
2808 |
| - full: '1.7.7', |
| 2808 | + full: '1.7.8', |
2809 | 2809 | major: 1,
|
2810 | 2810 | minor: 7,
|
2811 |
| - dot: 7, |
2812 |
| - codeName: 'kingly-exiting' |
| 2811 | + dot: 8, |
| 2812 | + codeName: 'enthusiastic-oblation' |
2813 | 2813 | };
|
2814 | 2814 |
|
2815 | 2815 |
|
@@ -2959,7 +2959,7 @@ function publishExternalAPI(angular) {
|
2959 | 2959 | });
|
2960 | 2960 | }
|
2961 | 2961 | ])
|
2962 |
| - .info({ angularVersion: '1.7.7' }); |
| 2962 | + .info({ angularVersion: '1.7.8' }); |
2963 | 2963 | }
|
2964 | 2964 |
|
2965 | 2965 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
@@ -35899,15 +35899,21 @@ var requiredDirective = ['$parse', function($parse) {
|
35899 | 35899 | require: '?ngModel',
|
35900 | 35900 | link: function(scope, elm, attr, ctrl) {
|
35901 | 35901 | 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); |
35903 | 35904 |
|
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 | + } |
35905 | 35910 |
|
35906 | 35911 | ctrl.$validators.required = function(modelValue, viewValue) {
|
35907 | 35912 | return !value || !ctrl.$isEmpty(viewValue);
|
35908 | 35913 | };
|
35909 | 35914 |
|
35910 | 35915 | attr.$observe('required', function(newVal) {
|
| 35916 | + |
35911 | 35917 | if (value !== newVal) {
|
35912 | 35918 | value = newVal;
|
35913 | 35919 | ctrl.$validate();
|
|
0 commit comments