Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: $ionicLoading.show() uses last value of duration if it isn't passed #2066

Closed
tomf009 opened this issue Aug 22, 2014 · 2 comments
Closed

Comments

@tomf009
Copy link

tomf009 commented Aug 22, 2014

Docs indicate $ionicLoading will show until hide() is called. But if you call show() with a duration, the next call to show() that doesn't have duration will use the previous call's duration. Looks like $ionicLoadingConfig is storing that previous call's value. Probably an issue for the other options as well.

Here's a CodePen where you can experience this behavior.

http://codepen.io/anon/pen/alhvo

Example:

$ionicLoading.show({
  template: 'This will show until hide() is called'
});

$ionicLoading.show({
  template: 'This will only show for a second',
  duration: 1000
});

$ionicLoading.show({
  template: 'Uh oh, this only shows for a second too! Even though there is no duration.'
});

Expected:
$ionicLoading.show() should behave consistently across multiple calls with different options.

Actual:
Options from previous calls to $ionicLoading.show() are being stored in $ionicLoadingConfig which effects the next calls to show().

Thanks for the great work on the framework! 🍻

@tomf009 tomf009 changed the title $ionicLoading.show() uses last value of duration if it isn't passed bug: $ionicLoading.show() uses last value of duration if it isn't passed Aug 26, 2014
@perrygovier
Copy link
Contributor

Good catch. All fixed up, thanks.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants