Open rinirinku opened 10 years ago
couldn't you just use the callback?
PubNub.ngHistory( {
channel : $scope.channel,
limit : $scope.limit,
callback: $scope.callback
});
@rinirinku @gdi2290 the callback isn't exposed via angular - I've taken on a TODO item though to expose it in an upcoming version -- stay tuned!
In the meantime, you could call history via PubNub.jsapi.history(), although this bypasses the angular scope broadcast since it's going against the PUBNUB object directly under the hood.
When trying to retrieve the history message in the on event , the loading time is too long. The spinner show and hides too fast. But the message is not yet loaded.
How can we calculate or get the exact time to make the history load? $scope.limit = 100 PubNub.ngHistory( { channel : $scope.channel, limit : $scope.limit });
$rootScope.$on(PubNub.ngMsgEv($scope.channel), function(ngEvent, payload) {