-
Notifications
You must be signed in to change notification settings - Fork 21
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
Improved app initialisation #1890
Conversation
Deployed to https://pr-1890.aam-digital.net/ |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Code looks good.
Tested in both demo+mock and local (persistent indexeddb) modes.
🎉 This PR is included in version 3.21.1-master.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.21.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
At the moment we have the problem that properties defined in the config are not yet available in the demo data generators.
This is because the config is saved last. If the config is saved first we have another problem where the app is loaded but on the initial screen some views might be empty because the app builds once the config is ready but the demo data is only created and saved afterwards.
The new solution is to save the config first but postpone the creation of the app.
This is done by moving the initialisation logic from the app component to the
APP_INITIALIZER
provider.This way all the initialisation is done and only afterwards the
AppComponent
gets build.