Fix #308 - Document title doesn't update when renaming active board

Signed-off-by: Riccardo Padovani riccardo@rpadovani.com
This commit is contained in:
Riccardo Padovani
2017-10-26 15:51:26 +02:00
committed by Julius Härtl
parent 88474bb11b
commit 8213b39949

View File

@@ -46,6 +46,13 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
$scope.board = BoardService.getCurrent();
StackService.clear(); //FIXME: Is this still needed?
$scope.$watch(function () {
return BoardService.getCurrent().title;
}, function() {
$scope.setPageTitle();
});
$scope.setPageTitle = function () {
if (BoardService.getCurrent()) {
document.title = BoardService.getCurrent().title + " | Deck - " + oc_defaults.name;