Open
Description
<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
Metadata
Metadata
Assignees
Labels
No labels