Update title dynamically

This commit is contained in:
Vit Brunner committed 2014-12-23 08:19:40 +01:00
1 parent bef3bfcfcd
commit 230ad02df4
2 files changed
+12 -5

No files matched your search

+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'