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

feat: hideOnStateChange should also hide on state change error #3051

Closed
vladipus opened this issue Feb 7, 2015 · 4 comments
Closed

feat: hideOnStateChange should also hide on state change error #3051

vladipus opened this issue Feb 7, 2015 · 4 comments

Comments

@vladipus
Copy link

vladipus commented Feb 7, 2015

Type: feat

Platform: all

Not exactly a bug maybe, but when the state change fails, the loading screen remains on screen and so the app gets stuck. The $stateChangeError should also be listened to, to hide the Loading, when the hideOnStateChange flag is used.

@vladipus vladipus changed the title hideOnStateChange should also hide on state change error feat: hideOnStateChange should also hide on state change error Feb 7, 2015
@mhartington
Copy link
Contributor

Can you provide an example of this in a codepen?

@vladipus
Copy link
Author

here you go http://codepen.io/vladius/pen/ByxdYa

@mhartington
Copy link
Contributor

@mhartington mhartington added the needs: reply the issue needs a response from the user label Feb 23, 2015
@vladipus
Copy link
Author

Thank you for your advice. However, I can't accept it as a solution for this reason: if the natural non-error delay will be greater than this value, the loading screen will mistakenly be hidden.

I've already fixed the issue in my local ionic modification. it is as easy as handling an error like this, in parallel to $stateChangeSuccess handler: deregisterStateErrorListener = $rootScope.$on('$stateChangeError', hideLoader);

I can't really see any argument against hiding the loading screen on errors, when the hideOnStateChange is set, can you?

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Feb 24, 2015
@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

3 participants