Added a test for if an empty titlePrefix is passed into the $changeTitle call
This commit is contained in:
committed by
Sebastiaan Janssen
parent
dce4f49a3b
commit
c9ea3656bd
@@ -47,7 +47,11 @@ app.run(['$rootScope', '$route', '$location', 'urlHelper', 'navigationService',
|
||||
var originalTitle = "";
|
||||
|
||||
$rootScope.$on('$changeTitle', function (event, titlePrefix) {
|
||||
$rootScope.locationTitle = titlePrefix + " - " + originalTitle;
|
||||
if (titlePrefix) {
|
||||
$rootScope.locationTitle = titlePrefix + " - " + originalTitle;
|
||||
} else {
|
||||
$rootScope.locationTitle = originalTitle;
|
||||
}
|
||||
});
|
||||
|
||||
/** execute code on each successful route */
|
||||
|
||||
Reference in New Issue
Block a user