-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
ionViewDidLoad fires before childs components have been loaded #8449
Comments
Note to team: I can easily reproduce this in a starter using the above example of trying to access an element directly in |
+1 |
So after messing about, it looks like if I set a timeout on anything in the ionViewDidLoad method, the time between where I get a white screen and where I get my content is between 30 and 40ms. |
@manucorporat Is this just me or this breaks everything? For example class SomePage {
items;
ionViewDidLoad() {
this.items = [];
}
} This thing worked in rc1 and now im getting If this is the case where should I put that logic? in the constructor? |
I need to rewrite some of the documentation but now the lifecycle events make a lot more sense than before: ionViewDidLoad, means that everything has been already loaded! including children. You can use two solutions:
or you could just do:
^ I think the second approach is the one I would choose. |
Short description of the problem:
ionViewDidLoad
fires before childs components have been loaded.What behavior are you expecting?
ionViewDidLoad
fires after childs components have been loaded, so I can access it's properties that are loaded in ngOnInitSteps to reproduce:
1.
2.
3.
console output
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
2 RC.0
Run
ionic info
from terminal/cmd prompt: (paste output below)The text was updated successfully, but these errors were encountered: