This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
refactor(ngModel): use minErr directly for correct doc creation #12416
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d303b3a
to
a699721
Compare
@@ -599,7 +596,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ | |||
forEach(ctrl.$asyncValidators, function(validator, name) { | |||
var promise = validator(modelValue, viewValue); | |||
if (!isPromiseLike(promise)) { | |||
throw $ngModelMinErr("$asyncValidators", | |||
throw minErr('ngModel')("$asyncValidators", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a separate problem, too: there's no error page for "$asyncValidators" (and the err code doesn't conform to our standards)
a699721
to
d98d0b6
Compare
@lgalfaso can you give this a quick review? |
LGTM |
d98d0b6
to
df39f1e
Compare
Remove the `new` from the minErr assignment, so the closure compiler can detect the errors correctly. Also removes the leading $ from the variable name to be consistent with the Angular.js file. Closes angular#12386
df39f1e
to
034a8b2
Compare
I realized that the closure compiler can detect the minErr if is assigned to another variable, we just need to remove the |
ggershoni
pushed a commit
to ggershoni/angular.js
that referenced
this pull request
Sep 29, 2015
Remove the `new` from the minErr assignment, so the closure compiler can detect the errors correctly. Also removes the leading $ from the variable name to be consistent with the Angular.js file. Closes angular#12386 Closes angular#12416
ggershoni
pushed a commit
to ggershoni/angular.js
that referenced
this pull request
Sep 29, 2015
Remove the `new` from the minErr assignment, so the closure compiler can detect the errors correctly. Also removes the leading $ from the variable name to be consistent with the Angular.js file. Closes angular#12386 Closes angular#12416
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The minerr_errors extractor of the closure compiler cannot detect minErrs that are not
thrown in the form of 'throw minErr(...'
This causes the error page code blocks which display the error template to stay empty.