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

[Ionic v4] Ugly modal transition when loading data in ionViewWillEnter or ngOnInit #14969

Closed
peterpeterparker opened this issue Aug 1, 2018 · 4 comments
Assignees

Comments

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Aug 1, 2018

Ionic Info
@ionic/angular: "4.0.0-beta.0"

Describe the Bug
Loading data in modals in lifecycle ionViewWillEnter or ngOnInit result in an ugly transition. As long as the data won't be loaded the modals won't be totally rendered, respectively the content and background of the modal will remains transparent

Screenshots

Open the modal:

capture d ecran 2018-08-01 a 09 22 42

Transition:

As you could see, title of the modal is rendered, modal is opened but content and background aren't rendered

capture d ecran 2018-08-01 a 09 23 21

Code and demo repo

git clone https://github.com/peterpeterparker/ion-title-component

Workaround
Load data afterwards respectively in lifecycle ionViewDidEnter

Expected Behavior
As in Ionic v3, I want to be able to load data earlier than only when modal is rendered otherwise my users will always face loading spinner or something and wait time and will at the end have the feeling that the app is slow

@ionitron-bot ionitron-bot bot added the triage label Aug 1, 2018
@ionitron-bot ionitron-bot bot removed the triage label Aug 12, 2018
@cvaliere
Copy link

@peterpeterparker should we still use ionViewDidEnter in Ionic v4?
This paragraph is definitely unclear to me. They say that Some of the Ionic lifecycle events are equivalent to Angular lifecycle hooks, but they don't see which ones... Any clue on that?

@peterpeterparker
Copy link
Contributor Author

@cvaliere my understanding is that ionViewWillEnter or ionViewDidEnter are still a thing (my migrated app still rely on them)

on the other side, as described in the the paragraph you mentioned, ionViewDidLoad has been deprecated and even don't exist anymore. To replace it, ngOnInit should be used

@manucorporat manucorporat self-assigned this Aug 25, 2018
@peterpeterparker
Copy link
Contributor Author

It just works like a charm in v4-beta.7 👍
Thx a lot

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 30, 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 30, 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