From 690b3429d3660a220ed533c08946d3106b0806d2 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Wed, 13 Nov 2024 14:59:03 +0100 Subject: [PATCH] move creation of angular boostrap __ng2-bootstrap-has-run mark, so it is set after turbo:load too --- frontend/src/app/app.module.ts | 2 ++ frontend/src/main.ts | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index a35c22a3565c..682dd15386b6 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -413,6 +413,8 @@ export class OpenProjectModule implements DoBootstrap { const root = document.querySelector(appBaseSelector); if (root) { appRef.bootstrap(ApplicationBaseComponent, root); + + document.body.classList.add('__ng2-bootstrap-has-run'); } } diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 51373fe7ccad..05daa7f7b909 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -45,9 +45,6 @@ void initializeLocale() // Due to the behaviour of the Edge browser we need to wait for 'DOM ready' void platformBrowserDynamic() - .bootstrapModule(OpenProjectModule) - .then(() => { - jQuery('body').addClass('__ng2-bootstrap-has-run'); - }); + .bootstrapModule(OpenProjectModule); }); });