-
Notifications
You must be signed in to change notification settings - Fork 13.4k
bug: $ionicSlideBoxDelegate.currentIndex return object #3260
Copy link
Copy link
Closed
Description
Type: bug
Platform: desktop browser
I have a slidebox with events values from a webservice. On event afterEnter I'm refreshing the events from slidebox and updating, so when I call the currentIndex I'm getting an object or something like that.
$scope.events = [];
$scope.$on('$ionicView.afterEnter', function(){
$scope.firstRefresh();
});
$scope.firstRefresh = function(){
$scope.showFirstRefresh = true;
$timeout(function(){
Evento.get()
.then(function(result){
$scope.events = result;
$ionicSlideBoxDelegate.update();
console.log($ionicSlideBoxDelegate.currentIndex); <--- HERE
}, function(err){
})
.finally(function(){
$scope.showFirstRefresh = false;
});
}, 1000);
};
What I'm getting on Chrome console:
function caller() {
var handle = this.handle;
var args = arguments;
var foundInstancesCount = 0;
var returnValue;
this._instances.forEach(function(instance) {
if ((!handle || handle == instance.$$delegateHandle) && instance.$$filterFn(instance)) {
foundInstancesCount++;
var ret = instance[methodName].apply(instance, args);
//Only return the value from the first call
if (foundInstancesCount === 1) {
returnValue = ret;
}
}
});
if (!foundInstancesCount && handle) {
return $log.warn(
'Delegate for handle "' + handle + '" could not find a ' +
'corresponding element with delegate-handle="' + handle + '"! ' +
methodName + '() was not called!\n' +
'Possible cause: If you are calling ' + methodName + '() immediately, and ' +
'your element with delegate-handle="' + handle + '" is a child of your ' +
'controller, then your element may not be compiled yet. Put a $timeout ' +
'around your call to ' + methodName + '() and try again.'
);
}
return returnValue;
}</span>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels