Matt Simoncavage
Posts: 0
Joined: Thu Jun 04, 2015 7:10 pm

If tab is active, show element

Hi, I have a set of tabs (the component, not the index ones) on a page in my Ionic app. There is Tab1 and Tab2. I have an image outside of the tab content elsewhere on my page. What I need to do is show it when Tab1 is active, but hide it when Tab2 is active. Is this possible, or is the only way to put it inside the tab content?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

If tab is active, show element

Hello Matt,

Please set some scope variable on the tab ng-click function and use that variable in the ng-hide attribute of the element, outside of the tab control

Return to “Issues”