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

Improved app initialisation #1890

Merged
merged 10 commits into from
Jun 8, 2023
Merged

Improved app initialisation #1890

merged 10 commits into from
Jun 8, 2023

Conversation

TheSlimvReal
Copy link
Collaborator

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.

@github-actions
Copy link

Deployed to https://pr-1890.aam-digital.net/

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@sleidig sleidig left a 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.

@sleidig sleidig merged commit 7e58e13 into master Jun 8, 2023
@sleidig sleidig deleted the app_initializer branch June 8, 2023 19:34
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.21.1-master.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.21.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants