Suresh Mainali
Suresh Mainali

Reputation: 232

Make a method call reactive in angular-meteor

I am not subscribing the collection but calling a method on server to return some part of collection. how can i re call a method again if there is any update on database and make the returned collections data sync with the server back-end mongoDb, without calling explicitly. i.e call autorun method if there is any change in database... is it possible. Please be kind and answer. I am new at meteor.

Thanks

Upvotes: 1

Views: 184

Answers (1)

Bruno Feroleto
Bruno Feroleto

Reputation: 99

Would 'getReactively' do the trick? Take a look at http://www.angular-meteor.com/api/1.3.2/get-reactively.

As it is said at API Reference:

Use this method to get a context variable and watch it reactively, so each change of this variable causes the dependents (autorun, helper functions and subscriptions) to run again.

Upvotes: 0

Related Questions