Hi all,
I’m having some problems with the slide box since the refactor. I am using some custom code to store the state of the slide-box in a service, and then when using a back button to return to the view, I check for and restore the state of the slidebox (to open on slide 2 with search assets populated).
The problem is that the slidebox restores properly and opens on slide index 2, but all of the slides in the slidebox are detached. I see slide-state=“detached” in my inspector and the slide is blank. As soon as I drag the slide with my finger, the slides attach and appear. This is reproducible in Chrome as well as the phone.
I’ve tried adding a $ionicSlideBoxDelegate.update() to no avail. Here is my code to restore the slide box contents and position:
if (currentModel.check()) {
console.log('found currentModel');
var newCurrentModel = currentModel.get();
console.log(newCurrentModel);
$scope.templates.categories = newCurrentModel.categories;
if ($scope.templates.categories.length == 0) {
$rootScope.somethingSelected = false;
} else {
$rootScope.somethingSelected = true;
}
$scope.searchString = newCurrentModel.searchString;
console.log('retrieved categories: ', $scope.templates.categories);
console.log('retrieved searchString: ', $scope.searchString);
$scope.searchResults = selectedSearchBundles.get();
$scope.restoring = true;
$rootScope.activeSearchSlide = 2;
$ionicSlideBoxDelegate.update(); // doesn't do anything
}