You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, could the autoBind parameter be documented better? I know it will bind to the NgZone, but what does that mean exactly? I thought it had to do with getting a better stack trace with errors, but I don't see that. I only notice sometimes I need to bind the subscription or otherwise I won't see the results immediately in my template.
MeteorComponent.call. When autoBind is true, the callback is called in a wrong way. Normally the callback is function(err, res), but when autoBind is true, the callback is called like function([err,res]), e.g. both parameters are passed inside an array. I think the autoBind parameter is superfluous, because if you don't want to bind you can just as well call Meteor.call. Perhaps that could at least be documented.
MeteorComponent.subscribe. When autoBind is true, and the resultCallback is an object, it seems all fields: onReady, onStop and onError are required. All of them should be optional. IIRC both onStop and onError incorrectly receive the error inside an array in the first parameter.
MeteorComponent.autorun. Haven't used this one yet, but looking at the docs and the source code it seems there is no way to specify the onError option, like the one of Tracker.autorun.
Hope this can be solved. Starting to like Meteor with Angular 2 :-)
The text was updated successfully, but these errors were encountered:
First of all, could the
autoBind
parameter be documented better? I know it will bind to the NgZone, but what does that mean exactly? I thought it had to do with getting a better stack trace with errors, but I don't see that. I only notice sometimes I need to bind the subscription or otherwise I won't see the results immediately in my template.MeteorComponent.call. When
autoBind
is true, the callback is called in a wrong way. Normally the callback isfunction(err, res)
, but whenautoBind
is true, the callback is called likefunction([err,res])
, e.g. both parameters are passed inside an array. I think theautoBind
parameter is superfluous, because if you don't want to bind you can just as well callMeteor.call
. Perhaps that could at least be documented.MeteorComponent.subscribe. When
autoBind
is true, and theresultCallback
is an object, it seems all fields:onReady
,onStop
andonError
are required. All of them should be optional. IIRC bothonStop
andonError
incorrectly receive the error inside an array in the first parameter.MeteorComponent.autorun. Haven't used this one yet, but looking at the docs and the source code it seems there is no way to specify the
onError
option, like the one ofTracker.autorun
.Hope this can be solved. Starting to like Meteor with Angular 2 :-)
The text was updated successfully, but these errors were encountered: