A
A
Alexander Drozdov2014-12-02 23:10:32
JavaScript
Alexander Drozdov, 2014-12-02 23:10:32

How to update a local collection (subscribe) in Meteorjs if something was added to the collection for the first time on the server?

In general, there is a Cart collection, I publish it on the server, and subscribe accordingly on the client. Next, I add something to the basket by calling the server method, let's say Meteor.call('add', 12); something was added to the collection on the server, but it is still empty on the client. As soon as you refresh the page, everything is shown at once, and with a further call to Meteor.call('add', 12); there are no problems, everything is dynamically updated on the client.
As a result a problem at the first in a collection. The local collection is not updated on the client... as if there is no connection, and then it appears....
how to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2015-08-22
@mannaro

Hmm, you have a mistake somewhere. I just tried it - everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question