1.0.0-beta.3 • Published 8 years ago

angular2-meteor-rxjs v1.0.0-beta.3

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

Build Status npm version

angular2-meteor-rxjs

Helpers for mapping meteor autorun contexts to observables

Remember that all of the exported observables are cold. That means that you have to subscribe before any action is taken, or you have to make them hot by other means.

Usage

AutorunObservable

Takes a callback as parameter that is run within an autorun context.

import {AutorunObservable} from 'angular2-meteor-rxjs';

let observable = new AutorunObservable<User[]>(() => {
    Meteor.subscribe('users.all');
    return Meteor.users.find({'profile.name': 'Joatin'}).fetch();
})

MeteorMethodObservable

Takes the name of the method and the parameters and wraps the result of the call into a observable.

import {MeteorMethodObservable} from 'angular2-meteor-rxjs';

let observable = new MeteorMethodObservable<string>('texts.insert', 'sample text');

ValidatedMethodObservable

Takes the validated method and the parameters and wraps the result of the call into a observable.

import {ValidatedMethodObservable} from 'angular2-meteor-rxjs';
import {insertText} from './both/methods/texts.methods';

let observable = new ValidatedMethodObservable<string>(insertText, 'sample text');
1.0.0-beta.3

8 years ago

1.0.0-beta.2

8 years ago

1.0.0-beta.1

8 years ago

1.0.0-beta.0

8 years ago

1.0.0-alpha.9

8 years ago

1.0.0-alpha.8

8 years ago

1.0.0-alpha.7

8 years ago

1.0.0-alpha.6

8 years ago

1.0.0-alpha.5

8 years ago

1.0.0-alpha.4

8 years ago

1.0.0-alpha.3

8 years ago

1.0.0-alpha.2

8 years ago

1.0.0-alpha.1

8 years ago

1.0.0-alpha.0

8 years ago