Initializing to a specific IonTab based on a route param?


#1

I’ve setup a basic tab swipe (nothing like what looks to be coming with IonSlidingTabs) where I use the ion slider and ion tabs directives, which on slide change flips the tab, it’s a ten minute solution for tab swiping that works, but doesn’t use the tabs for anything other than navigation of the slider. But, I’d like to be able to choose which slider/tab is shown based on a optional route param, where if not present the default is index zero. It appears I can do this with the slider using active-slide connected to a model in my controller, but I can’t set the tab to be a specific index, and since active-slide takes a model I can’t attach an action to it.

I put together a bare bones example in CodePen

Is there anything similar to active-slide for ion tabs? Or someway to set the tab without relying on a $timeout.

Cheers,
Martin