connected
(the connection is up and
running), connecting
(disconnected and trying to open a
new connection), and waiting
(failed to connect and
waiting to try to reconnect).retry_time - (new Date()).getTime()
. This key will
be set only when status
is waiting
.
There are " + high_scoring.count() + " posts with " + "scores greater than 10
"; }); document.body.appendChild(frag); Unlike the other functions, `count` registers a dependency only on the number of matching documents. (Updates that just change or reorder the documents in the result set will not trigger a recomputation.) {{> api_box cursor_rewind}} The `forEach`, `map`, or `fetch` methods can only be called once on a cursor. To access the data in a cursor more than once, use `rewind` to reset the cursor. {{> api_box cursor_observe}} Establishes a *live query* that notifies callbacks on any change to the query result. `callbacks` may have the following functions as properties:We've always been at war with " + Session.get("enemy") + "
"; }); // Page will say "We've always been at war with Eastasia" document.body.append(frag); // Page will change to say "We've always been at war with Eurasia" Session.set("enemy", "Eurasia"); {{> api_box equals}} These two expressions do the same thing: (1) Session.get("key") === value (2) Session.equals("key", value) ... but the second one is always better. It triggers fewer invalidations (template redraws), making your program more efficient. Example: {{dstache}}! Show a dynamically updating list of items. Let the user click on an item to select it. The selected item is given a CSS class so it can be rendered differently. }} {{dstache}}#each posts}} {{dstache}}> post_item }} {{dstache}}/each}} {{! }}template>There are " + Users.find({online: true}).count() + " users online.
"; }); document.body.appendChild(frag); // Find all users that have been idle for a while, and mark them as // offline. The count on the screen will automatically update. Users.update({idleTime: {$gt: 30}}, {online: false}); // Show a counter, and let the user click to increase or decrease it. Session.set("counter", 0); var frag = Meteor.ui.render(function () { return '