Skip to content

Commit

Permalink
Something went wrong with the title update
Browse files Browse the repository at this point in the history
Instead of $rootScope, which is not injected, we need to use scope
The title prefix didn't include the original title
  • Loading branch information
nul800sebastiaan committed Sep 28, 2019
1 parent 99d2bef commit 7de7e59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
title += name;
}

$rootScope.$emit("$changeTitle", title);
scope.$emit("$changeTitle", title);
});
scope.vm = {};
scope.vm.dropdownOpen = false;
Expand Down
4 changes: 2 additions & 2 deletions src/Umbraco.Web.UI.Client/src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 7de7e59

Please sign in to comment.