-
Notifications
You must be signed in to change notification settings - Fork 216
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
remove ionic overlay workaround and make login controller cleaner #427
remove ionic overlay workaround and make login controller cleaner #427
Conversation
darn... just looked at the changes... I meant to apply that declarative unsubscribe thing on the observable so a real request will be aborted if the user navigates away but I forgot :-/. |
request abort added to PR |
generators/app/templates/src/app/login/__auth._login.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Following your e2e changes, it might be interesting to migrate all promise code from service/components to async await 😃 (I know @captaincaius your initial Ionic PR had it, it might be time to resurrect this and complete the remaining work everywhere else).
But let's keep this in a separate PR, I've created #429 to follow
haha you were right though... it was sneaky of me to creep it into that PR :P my bad |
Good news - ionic's overlays seem to be test-friendly now!
got rid of the mix of promises and rxjs in login controller. But after making it as clean and readable as Luiza suggested, I sacrificed a little readability to ensure that the API request goes in parallel to the loading overlay, uh, loading :P. Please let me know if you folks would prefer to prioritize readability instead.
please notice I snuck in a little memory leak fix into this commit by navigating based on the route snapshot instead of subscribing. Hope that's ok.