Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to allow functions supplied to ngfModelInvalid. #2025

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

krptodr
Copy link

@krptodr krptodr commented Nov 23, 2017

This will resolve my issue #2024

@krptodr krptodr force-pushed the master branch 2 times, most recently from 5ea4754 to 5ddde2d Compare November 27, 2017 21:53
@@ -155,7 +155,11 @@ ngFileUpload.service('Upload', ['$parse', '$timeout', '$compile', '$q', 'UploadE
var invalidModel = upload.attrGetter('ngfModelInvalid', attr);
if (invalidModel) {
$timeout(function () {
$parse(invalidModel).assign(scope, isSingleModel ? invalidFile : invalidFiles);
if (invalidModel.includes('(')){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it seem like you have to pass the function in like

ngf-model-invalid="method()"

rather than

ngf-model-invalid="method"

Perhaps parse it and use typeof to check instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants