0
我想重置用戶的密碼,但不是使用API本身,我想創建一個提示。我使用meteor-ionic,並可能要使用所示的提示之一here離子和流星;用提示重置密碼
Accounts.resetPassword(this.params.token, function() {
IonPopup.prompt({
title: 'Create a new password',
template: 'Please enter your new password',
okText: 'Submit',
inputType: 'password',
inputPlaceholder: 'Your Password',
onOk: function() {
return this.password;
}
});
}, function(err) {
Router.go('home');
});
然而,這會給出一個錯誤。
Exception in callback of async function: Error: Match error: Expected string, got function
如果我更換Ion.popup()
與prompt('please put in password')
,它會工作。這導致我認爲onOk
函數的執行沒有停止。
我怎樣才能使用彈出窗口重置密碼與流星離子?