离子和流星;提示重新设置密码

问题描述 投票:0回答:1

我想重设用户密码,但是我不想创建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');
});

但是,这将产生错误:

异步函数的回调中的异常:错误:匹配错误:预期的字符串,有功能

如果将Ion.popup()替换为prompt('please put in password'),它将起作用。这使我认为onOk函数不会停止执行。

我如何使用弹出窗口重置流星密码?

javascript ionic-framework events meteor dom-events
1个回答
3
投票

我认为您需要的是这样的东西:

onOk: function(event,response) {
  return response;
© www.soinside.com 2019 - 2024. All rights reserved.