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

How to close ionModal? #15

Open
MichaelJCole opened this issue Oct 5, 2015 · 0 comments
Open

How to close ionModal? #15

MichaelJCole opened this issue Oct 5, 2015 · 0 comments

Comments

@MichaelJCole
Copy link

<template name="signIn">
  {{#ionModal title="Welcome :-)"}}

    {{> atForm}}

  {{/ionModal}}
</template>

On success, the user is logged in, but the modal does not close.

How do I close the modal? I don't see a way to send a callback to the atForm.

ionModal is from the Meteoric project.

The example uses IonModal.close() to close the modal.

  'click .loginForm-signin': function(e, template) {
    template.error.set(false);
    Meteor.loginWithPassword(
      $('#formEmail').val(),
      $('#formPassword').val(),
      function(err) {
        if (err) return template.error.set(Helpers.decodeLoginError(err));
        // Login was a success.  Record in profile.
        Meteor.users.update(Meteor.userId(), {
          $set: { 'profile.lastPhoneAppLogin': new Date() }
        });
        IonModal.close();
      }
    );
  },

Thanks!

Mike

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

No branches or pull requests

1 participant