ionic Slide pager disappear in android production release

368 views Asked by At

I have encountered a weird issue. When slide the pager which is loaded when app is started, it works fine for Android debug version, and both debug and release version for iOS.

The pager disappears when I run/build with the following options:

ionic cordova run android --prod --release However, if i load the slides through menu in the android production release, the pager appears. Just wondering what is causing this ? The following are the ionic info.

The HTML code:

    <ion-content>

    <ion-slides pager>
    <ion-slide *ngFor="let slide of slides" [ngStyle]="{'background-color': slide.color}">
      <br>
      <button ion-button small round (click)="goToHome()">{{ "SLIDES.SKIP" | translate }}</button><br>
      <img *ngIf="translate.currentLang == 'zh_CN'" [src]="slide.image_zh_CN" class="slide-image"/>
      <img *ngIf="translate.currentLang != 'zh_CN'" [src]="slide.image" class="slide-image"/><br>
      <b *ngIf="translate.currentLang == 'zh_CN'" class="slide-title" [innerHTML]="slide.title_zh_CN"></b>
      <b *ngIf="translate.currentLang != 'zh_CN'"class="slide-title" [innerHTML]="slide.title"></b>
      <p *ngIf="translate.currentLang == 'zh_CN'" [innerHTML]="slide.description_zh_CN"></p>
      <p *ngIf="translate.currentLang != 'zh_CN'"[innerHTML]="slide.description"></p>
    </ion-slide>
    <ion-slide>

      <img *ngIf="translate.currentLang == 'zh_CN'" src="assets/img/8-cn.png" class="slide-image"/><br>
      <img *ngIf="translate.currentLang != 'zh_CN'" src="assets/img/8-en.png" class="slide-image"/><br>
      <b *ngIf="translate.currentLang == 'zh_CN'" class="slide-title">您需要登记以预约医师!</b><br>
      <b *ngIf="translate.currentLang != 'zh_CN'" class="slide-title">You need to register to make appointment!</b><br>
      <button ion-button clear icon-right color="primary" (click)="goToLogin()">
        <span *ngIf="translate.currentLang == 'zh_CN'">登记</span><br>
        <span *ngIf="translate.currentLang != 'zh_CN'">Register</span><br>
        <ion-icon name="arrow-forward"></ion-icon>
      </button>
      <button ion-button clear icon-right color="primary" (click)="goToHome()">
        <span *ngIf="translate.currentLang == 'zh_CN'">继续</span>
        <span *ngIf="translate.currentLang != 'zh_CN'">Continue</span>
        <ion-icon name="arrow-forward"></ion-icon>
      </button>
    </ion-slide>
  </ion-slides>

</ion-content>

The ionic info:

cli packages: 

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:

Cordova CLI : 7.0.1 
local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.0
System:

Android SDK Tools : 24.4.1
ios-deploy        : 1.9.1 
ios-sim           : 5.0.3 
Node              : v8.4.0
npm               : 5.3.0 
OS                : macOS Sierra
Xcode             : Xcode 8.3.3 Build version 8E3004b
0

There are 0 answers