LoadingController and ActionSheetController breaking each other
See original GitHub issueFunctionality I want to achieve:
- Show Loading
- Do some async work
- dismiss Loading and show ActionSheet
Short description of the problem:
loading.dismiss() not working in beta 11, it was working in beta 10
What behavior are you expecting?
- Expected loading dismiss before ActionSheet present
Steps to reproduce: Run following code from some button click. It will show loading, then actionsheet with loading in background and you can cancel actionsheet but loading will still be in background
let loading = this.loadingCtrl.create({
content: 'Loading data...',
duration:5000
});
loading.present();
setTimeout(()=> {
loading.dismiss();
let actionSheet = this.actionSheetCtrl.create({
title: "Select me",
});
actionSheet.addButton({
text: "first",
handler: ()=> {
console.log('first');
}
});
actionSheet.addButton({
text: 'Cancel',
role: 'cancel',
handler: () => {}
});
actionSheet.present();
}, 2000);
Other information: Using setTimeout to mimic async function call
Which Ionic Version? Ionic 2 beta 11
Plunker that shows an example of your issue
For Ionic 2 issues - http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview Plunker uses beta 10, couldn’t modify it to use beta 11 correctly
Run ionic info
from terminal/cmd prompt:
Your system information:
Cordova CLI: 6.3.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.11 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v6.1.0 Xcode version: Xcode 7.3.1 Build version 7D1014
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Ahh ok. So to do this instead of putting a duration on your loading component you would call
loading.dismiss()
after your async work was done.@jgw96
Functionality I want to achieve:
Show Loading Do some async work dismiss Loading and show ActionSheet