Ionic2 Click Not Working

Hi there, this is my first post in ionic forum.

I have a problem when i build my app to android.
When i execute: ionic build android the click function WORKS normally.

But, if I execute ionic build android --prod the click function NOT WORK.

My code:

    <ion-item color="light" class="pd-font-size-14px pd-endereço-trocar">
        <ion-label (click)="showMyCustomAlert()">My address</ion-label>
        <ion-label text-right color="danger" (click)="showMyCustomModal()">Open Page</ion-label>
    </ion-item> 

What’s wrong?

Thanks for all!

1 Like

Can you try the below? Its from the ionic documentation

Production Builds
To run or build your app for production, run

ionic run android --prod --release
# or
ionic build android --prod --release
This will minify your app’s code as Ionic’s source and also remove any debugging capabilities from the APK. This is generally used when deploying an app to the Google Play store.

Thanks for reply ashley_shookhye!

I’ve not try, but if I use --release I need sign my app.

I don’t have a keystore to do this