Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

sync ui-router on turbo visits

Oliver Güntherca2f70b89f0a
diff --git a/frontend/src/app/core/routing/openproject.routes.ts b/frontend/src/app/core/routing/openproject.routes.ts
index ab12d6d9031..22185a5ed89 100644
--- a/frontend/src/app/core/routing/openproject.routes.ts
+++ b/frontend/src/app/core/routing/openproject.routes.ts
@@ -170,13 +170,18 @@ export function initializeUiRouterListeners(injector:Injector) {
const currentProject:CurrentProjectService = injector.get(CurrentProjectService);
const firstRoute:FirstRouteService = injector.get(FirstRouteService);
const backRoutingService:BackRoutingService = injector.get(BackRoutingService);
+ const uiRouter = injector.get(UIRouter);
+
+ // Connect ui router to turbo drive
+ document.addEventListener('turbo:load', () => {
+ uiRouter.urlService.sync();
+ });
// Check whether we are running within our complete app, or only within some other bootstrapped
// component
const wpBase = document.querySelector(appBaseSelector);
// Uncomment to trace route changes
- // const uiRouter = injector.get(UIRouter);
// uiRouter.trace.enable();
// For some pages it makes no sense to display them on mobile (e.g. the split screen).