this.connection

Server this.connection Source Access inside the publish function. The incoming connection for this subscription.

this.changed

Server this.changed(collection, id, fields) Source Call inside the publish function. Informs the subscriber that a document in the record set has been modified. Arguments collection String The name of the collection that contains the changed document. id String The changed document's ID. fields Object The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a val

this.added

Server this.added(collection, id, fields) Source Call inside the publish function. Informs the subscriber that a document has been added to the record set. Arguments collection String The name of the collection that contains the new document. id String The new document's ID. fields Object The fields in the new document. If _id is present it is ignored.

Testing

Introduction Testing allows you to ensure your application works the way you think it does, especially as your codebase changes over time. If you have good tests, you can refactor and rewrite code with confidence. Tests are also the most concrete form of documentation of expected behavior, since other developers can figure out how to use your code by reading the tests. Automated testing is critical because it allows you to run a far greater set of tests much more often than you could manually,

template.view

Client template.view Source The View object for this invocation of the template.

template.subscribe

Client template.subscribe(name, [arg1, arg2...], [options]) Source A version of Meteor.subscribe that is stopped when the template is destroyed. Arguments name String Name of the subscription. Matches the name of the server's publish() call. arg1, arg2... Any Optional arguments passed to publisher function on server. Options onReady Function Passed to Meteor.subscribe. onStop Function Passed to Meteor.subscribe. connection DDP Connection The connection on which to m

Template.registerHelper

Client Template.registerHelper(name, function) import { Template } from 'meteor/templating' Source Defines a helper function which can be used from all templates. Arguments name String The name of the helper function you are defining. function Function The helper function itself.

Template.parentData

Client Template.parentData([numLevels]) import { Template } from 'meteor/templating' Source Accesses other data contexts that enclose the current data context. Arguments numLevels Integer The number of levels beyond the current data context to look. Defaults to 1.

Template.myTemplate.

Templates When you write a template as <template name="foo"> ... </template> in an HTML file in your app, Meteor generates a "template object" named Template.foo. Note that template name cannot contain hyphens and other special characters. The same template may occur many times on a page, and these occurrences are called template instances. Template instances have a life cycle of being created, put into the document, and later taken out of the document and destroyed. Meteor manages

template.lastNode

Client template.lastNode Source The last top-level DOM node in this template instance.