Use id from collection insert within a meteor method

后端 未结 1 1307
天命终不由人
天命终不由人 2021-01-22 05:17

Within my Angular / Meteor app I want to use the created id from a collection insert in a meteor method in the client.

Within a client Angular component the following me

1条回答
  •  粉色の甜心
    2021-01-22 06:20

    I think the error is on the server-side meteor method:

    Items.collection.insert(newItem)
    

    With the added .collection it will return the new _id-string.

    0 讨论(0)
提交回复
热议问题