Update title dynamically

This commit is contained in:
Vit Brunner
2014-12-23 08:19:40 +01:00
parent bef3bfcfcd
commit 230ad02df4
2 changed files with 12 additions and 5 deletions
+9 -2
View File
@@ -1,6 +1,13 @@
angular.module("sideBySide.controllers", [])
.controller "AppController", [
() -> null
.controller "AppController",
['$scope', 'poems'
($scope, poems) ->
$scope.title = =>
sbs = 'Side By Side viewer'
if poems.config.title
poems.config.title + ' ' + sbs
else
sbs
]
.controller "ComparisonController",
['$document', '$rootScope', '$scope', 'filter', 'load', 'poems', 'route', 'transformer'