【问题标题】:Update my documents in Meteor在 Meteor 中更新我的文档
【发布时间】:2015-07-30 14:56:34
【问题描述】:

我想在 Meteor 中更新我的文档。

更新失败:匹配失败

错误是由以下原因引起的:

Template.KullaniciListele.events({
  'click .kaydet': function (event,template) {
    event.preventDefault();
        var tel = template.$('#telno').val();
        Meteor.users.update(this._id), {
          "$set": {
          tel:tel
          }
      };
  }
});

【问题讨论】:

    标签: javascript meteor


    【解决方案1】:

    第 1 步。检查您的代码,让它看起来漂亮 - 否则您自己甚至看不到错误。首先,这里有错误(它是如何工作的?):

    Meteor.users.update(this._id, {
       $set: {
          tel: tel
       }
    });
    

    第 2 步。尝试检查 this._id 的值

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多