Hi,please help me.
First file is true run.but second file dont work.
FIRST FILE
export class ..................{
constructor(public platform:Platform,public alertCtrl:AlertController,private nativeAudio: NativeAudio,public navCtrl: NavController, public navParams: NavParams,public storage: Storage) {
platform.registerBackButtonAction(()=>{
let confirm = this.alertCtrl.create({
title: 'EXİT?',
message: 'Do you agree exit?',
buttons: [
{
text: 'No',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Yes',
handler: () => {
console.log('Agree clicked');
this.platform.exitApp();
}
}
]
});
}
ionViewWillEnter(){
this.storage.get('gender').then((data)=>{
if(data==".............){
..................;}
else{
..................;}});
}
}
SECOND FILE
export class .................. {
constructor(public platform:Platform,public alertCtrl:AlertController,private nativeAudio: NativeAudio,public storage: Storage,public navCtrl: NavController, public navParams: NavParams) {
platform.registerBackButtonAction(()=>{
let confirm = this.alertCtrl.create({
title: 'EXİT?',
message: 'Do you agree exit?',
buttons: [
{
text: 'No',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Yes',
handler: () => {
console.log('Agree clicked');
this.platform.exitApp();
}
}
]
});}
ionViewWillEnter(){
if(this.no==...){
..................;
}
else if(this.no==...){
..................;
}
else if(this.no==...){
..................);
}
}
}