From 8213b3994960130fa5d49378d6f1e12434f421de Mon Sep 17 00:00:00 2001 From: Riccardo Padovani Date: Thu, 26 Oct 2017 15:51:26 +0200 Subject: [PATCH] Fix #308 - Document title doesn't update when renaming active board Signed-off-by: Riccardo Padovani riccardo@rpadovani.com --- js/controller/BoardController.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js index 4b1b376cd..21d13251a 100644 --- a/js/controller/BoardController.js +++ b/js/controller/BoardController.js @@ -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;