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

feat: bhSubmit checks for promises #442

Merged
merged 1 commit into from
May 27, 2016
Merged

Conversation

jniles
Copy link
Contributor

@jniles jniles commented May 26, 2016

This commit implements the suggestions proposed in #431. The bhSubmit directive responsible for toggle the form's $loading state now supports inputs other than Promises. If the input is not a promise, the form immediately cancels the $loading state. Otherwise, the $loading state is toggled off on resolution of the Promise.

Closes #431.


Thank you for contributing!

Before submitting this pull request, please verify that you have:

  • Run your code through JSHint. Check out our styleguide.
  • Run integration tests.
  • Run end-to-end tests.
  • Accurately described the changes your are making in this pull request.

For a more detailed checklist, see the official review checklist that this PR will be evaluated against.

Ensuring that the above checkboxes are completed will help speed the review process and help build a stronger application. Thanks!

@sfount
Copy link
Contributor

sfount commented May 27, 2016

Change LGTM.

It seems there a number of modules that do not do their own $invalid check given the previous directive implementation.

Should those be changed here or should we leave it up to the module developers to update given this change?

EDIT: Actually the only module I've found after doing a number of searches is Cash.

@jniles
Copy link
Contributor Author

jniles commented May 27, 2016

@sfount, I would leave it up to the module developers. That will give us a reason to go through and write tests that check for the proper error handling. To do that here would be a rather big change for a small proposal.

Do you agree?

@sfount
Copy link
Contributor

sfount commented May 27, 2016

Sounds good to me!

This commit implements the suggestions proposed in #431.  The `bhSubmit`
directive responsible for toggle the form's $loading state now supports
inputs other than Promises.  If the input is not a promise, the form
immediately cancels the $loading state.  Otherwise, the $loading state
is toggled off on resolution of the Promise.

Closes #431.
@sfount sfount merged commit d4c3e69 into IMA-WorldHealth:master May 27, 2016
@jniles jniles deleted the issue-431 branch May 27, 2016 12:41
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.

None yet

2 participants