Fork me on GitHub
This API is deprecated since version 0.6.0 and no longer available since version 0.7.0

MeteorComponent

A class to extend in Angular 2 components. Contains wrappers over main Meteor methods, that does some maintenance work behind the scene. For example, it destroys subscription handles when the component is being destroyed itself.

Kind: global class

meteorComponent.autorun(func, autoBind) ⇒ Tracker.Computation

Method has the same notation as Meteor.autorun except the last parameter.

Kind: instance method of MeteorComponent
Returns: Tracker.Computation - - Object representing the Meteor computation

Param Type Default Description
func function Callback to be executed when current computation is invalidated.
autoBind Boolean true autoBind Determine whether Angular 2 zone will run after the func call to initiate change detection.

meteorComponent.subscribe(name, ...args, autoBind) ⇒ Meteor.SubscriptionHandle

Method has the same notation as Meteor.subscribe: subscribe(name, [args1, args2], [callbacks], [autoBind]) except the last autoBind param (see autorun above).

Kind: instance method of MeteorComponent
Returns: Meteor.SubscriptionHandle - - The handle of the subscription created by Meteor.

Param Type Description
name String Name of the publication in the Meteor server
...args any Parameters that will be forwarded to the publication.
autoBind Boolean autoBind Determine whether Angular 2 zone will run after the func call to initiate change detection.

meteorComponent.call(name, ...args, autoBind)

Method has the same notation as Meteor.subscribe: subscribe(name, [args1, args2], [callbacks], [autoBind]) except the last autoBind param (see autorun above).

Kind: instance method of MeteorComponent

Param Type Description
name String Name of the publication in the Meteor server
...args any Parameters that will be forwarded to the method.
autoBind Boolean autoBind Determine whether Angular 2 zone will run after the func call to initiate change detection.