Before moving my angular app to ionic, I had hand-hacked up a navigation somewhat like the ionic slideBox. I was displaying a series of cruise ship deck images, and the routing was such that /decks/2 would take you to deck 2, /decks/3 to 3.
I’ve switched it to using slideBox and it works very smoothly (unlike my version :P) but I have 2 things I can’t seem to make work.
- I’d love to update the history so that when a slide changes, the route updates like the old code.
- I want to be able to start on slide index n, based on the route passed in when the controller’s initialized.
Does anyone have any ideas how that would work?
For #2, I’ve tried doing something like “$scope.$broadcast(‘setSlide’, 3)”, or putting that inside a $timeout() or $scope.$evalAsync() call, but it seems the slideBox is not initialized by the time anything gets called from my end.