Skip to content

Commit

Permalink
move creation of angular boostrap __ng2-bootstrap-has-run mark, so it…
Browse files Browse the repository at this point in the history
… is set after turbo:load too
  • Loading branch information
toy authored and oliverguenther committed Nov 13, 2024
1 parent 9f9a969 commit f395be2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ export class OpenProjectModule implements DoBootstrap {
if (root) {
appRef.bootstrap(ApplicationBaseComponent, root);
}

document.body.classList.add('__ng2-bootstrap-has-run');
}

private registerCustomElements(injector:Injector) {
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ void initializeLocale()
initializeGlobalListeners();

// 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');
});
void platformBrowserDynamic().bootstrapModule(OpenProjectModule);
});
});

0 comments on commit f395be2

Please sign in to comment.