From 7de7e59f5543031fa0635499306509a42f57f3d7 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sat, 28 Sep 2019 11:29:04 +0200 Subject: [PATCH] Something went wrong with the title update Instead of $rootScope, which is not injected, we need to use scope The title prefix didn't include the original title --- .../components/editor/umbeditorcontentheader.directive.js | 2 +- src/Umbraco.Web.UI.Client/src/init.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js index b26113c9d10f..b3948bd7c42e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js @@ -35,7 +35,7 @@ title += name; } - $rootScope.$emit("$changeTitle", title); + scope.$emit("$changeTitle", title); }); scope.vm = {}; scope.vm.dropdownOpen = false; diff --git a/src/Umbraco.Web.UI.Client/src/init.js b/src/Umbraco.Web.UI.Client/src/init.js index b8b210db9e09..aa9b7b920fc1 100644 --- a/src/Umbraco.Web.UI.Client/src/init.js +++ b/src/Umbraco.Web.UI.Client/src/init.js @@ -46,8 +46,8 @@ app.run(['$rootScope', '$route', '$location', 'urlHelper', 'navigationService', var originalTitle = ""; - $rootScope.$on('$changeTitle',function (event, titlePrefix) { - $rootScope.locationTitle = titlePrefix; + $rootScope.$on('$changeTitle', function (event, titlePrefix) { + $rootScope.locationTitle = titlePrefix + " - " + originalTitle; }); /** execute code on each successful route */