1

How to hide the image scroll if the image is empty? I have four images, where 3rd and 4th images will not be mandatory should be shown up, if the image name is noimg.jpg , How to achieve this?

below code , hide the image but still the auto scroll goes and enter image description here

  <ion-slide-box auto-play='true' does-continue='true' slide-intervel='30000'>
   <ion-slide> 
    <img style="width:150px;height:150px;alignment-adjust: middle;"  src="http://www.xx.com/uploads/icons/{{y.menu_icon}}"/>
   </ion-slide>
   <ion-slide> 
      <img style="width:150px;height:150px;margin-left: 40px;alignment-adjust: middle;" src="http://www.xx.com/uploads/icons/{{y.menu_icon2}}"/>
   </ion-slide> 
   <ion-slide ng-show="y.menu_icon3 != 'noimg.jpg'"> 
      <img style="width:150px;height:150px;margin-left: 40px;alignment-adjust: middle;" src="http://www.xx.com/uploads/icons/{{y.menu_icon3}}"/>
   </ion-slide> 
   <ion-slide ng-show="y.menu_icon4 != 'noimg.jpg'"> 
      <img style="width:150px;height:150px;margin-left: 40px;alignment-adjust: middle;" src="http://www.xx.com/uploads/icons/{{y.menu_icon4}}"/>
   </ion-slide-box>
Hardik Vaghani
  • 2,163
  • 24
  • 46
Dan
  • 2,086
  • 11
  • 71
  • 137

1 Answers1

0

You can use show-pager="false" attribute

OR

with css you can do .slider-pager { display:none; } conditionally if there is no data for slider.

Regards.

Hardik Vaghani
  • 2,163
  • 24
  • 46