Ng-show doesn't work on Slide Box


#1

For Slide Box http://ionicframework.com/docs/api/directive/ionSlideBox/ how do we show and hide a specific slide based on variable?

Such as:

  <ion-slide ng-show="someVar">
    <div class="box yellow"><h1>YELLOW</h1></div>
  </ion-slide>

#2

Call the ionic slide box delegate’s update method whenever you change the value of somevar


#3

@peey what I tried to find out is how to hide or show a ion-slide dynamically. The default ng-show from AngularJS doesn’t work.


#4

@hawkphil sorry about that, one error on my part. Instead of using ng-show, you should use ng-if and then whenever you make changes to the variable that controls ng-if, you call the slide box delegate’s update method to let ionic know that you have made changes. This should work, if it doesn’t, then write a codepen demo so that I can see what you’re trying to accomplish live.