I am having similar issues. I tried the $ionicSlideBoxDelegate.update(); and it worked for the 0.9.27 release but failed in the nightly with the error below.
Itās official. Delegates are gone. The official replacement isnāt exactly clear yet. So, youāll need to wait or drop down to 0.9.27 to continue using them.
ā¦What? Itās somewhat disconcerting that they would be removed so late in the process to the 1.0 beta without a replacement in place yet. Hope this will be cleared up soon!
In my case it seems the data that is used in my scope variable isnāt done processing yet before the view loads that contains the slidebox. This will probably not happen if you have a simple scope variable.
The slideboxDelegate update() function just doesnāt work though. But since the delegates will be removed completely in the 1.0 release it doesnāt make sense to invest in a solution for that issue. I say itās best to wait until the beta is here and take it from there.
I am using the $ionicSlideBoxDelegate.update() with 0.9.27. When I get data back from $http, I call this method which corrects issues with the initial display of those items in the repeat loop. It is one line of code and one injection. Not a large investment.
DataHandler.GetRandomArtists(3, function(response){
$scope.data.random_artists = response;
$ionicSlideBoxDelegate.update(); // you can use $timeout
});
please some one upload a correct solution or atleast provide an alternative
because $ionicSlideBoxDelegate.update(); doesnāt seem to be working in my case
So here is what I found fixed the problem for meā¦ It seems some left/right positioning was commented out in the latest beta, that caused this problem. You can either uncomment them in the core or just add this after you load ionicā¦
.slide-ios,
.slide-left-right-ios7,
.slide-right-left-ios7.reverse {
> .ng-enter, &.ng-enter,
> .ng-leave, &.ng-leave {
right: -1px;
left: -1px;
}
> .ng-enter, &.ng-enter {
/* NEW content placed far RIGHT BEFORE it slides IN from the RIGHT */
z-index: 2;
}
}
.slide-ios.reverse,
.slide-left-right-ios7.reverse,
.slide-right-left-ios7 {
> .ng-enter, &.ng-enter, > .ng-leave, &.ng-leave {
right: -1px;
left: -1px;
}
> .ng-enter, &.ng-enter {
/* NEW content placed far LEFT BEFORE it slides IN from the LEFT */
z-index: 1;
}
}
add fresh slides on every selection from drop down on same page and see the slider-pager dots it goes on increase not consistency if slides as 2 means dots are 4 it adds previous 2 also
You might consider trying the nightly and apply the ābreaking changesā from the post that is pinned to the top of the forum. I have had similar issues that have been posted here. I have not had a chance to try the nightly changes but I am planning on doing that in the near future.
I know this is old, but I ran into this issue as well while using an ng-repeat on a slider. My solution was pretty simple:
expose $ionicSlideBoxDelegate;
controllersModule.controller("ViewObservationCtrl", ["$scope", "$ionicSlideBoxDelegate",
function ($scope, $ionicSlideBoxDelegate) {
$scope.updateSlider = function () {
$ionicSlideBoxDelegate.update(); //or just return the function
}
});
....
Then on my view I called the update function with ng-init:
<ion-slide ng-repeat="image in observation.images.image" ng-init="updateSlider()">
<img src="...jpg"/>
</ion-slide>