Slides size change according to orientation in ionic

I have a problem here. i have used 3slides in an ionic app when i load it my ipad pro emulator .when i rotate the screen or change the orientation .the last slide out this three automaticaly corrects the size of slideview in to one with out any prob it displays .but the other two slides doesnt change its size .the codes used for all three are same

Keep it simple have two slides components and use

ion-slides showWhen=“portrait”
ion-slides showWhen=“landscape”

That way can apply different css styles and layouts to each.

can u give me a sample

<ion-slides showWhen=“portrait” class="mycssprotrait">
  <ion-slide>
    <h1>Slide 1</h1>
  </ion-slide>
  <ion-slide>
    <h1>Slide 2</h1>
  </ion-slide>
  <ion-slide>
    <h1>Slide 3</h1>
  </ion-slide>
</ion-slides>