Assemble correct display url part

This commit is contained in:
Vit Brunner
2014-12-19 21:53:31 +01:00
parent 6d039a8230
commit 9055e027df
3 changed files with 15 additions and 4 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
angular.module("sideBySide").service "poems", ['fetch', (fetch) ->
angular.module("sideBySide").service "poems", ['fetch', 'route', (fetch, route) ->
@all = [{
meta: {
Active: true
@@ -36,7 +36,8 @@ angular.module("sideBySide").service "poems", ['fetch', (fetch) ->
@load = (base) =>
fetch(base).then (config) =>
config.fetchPoems.then (poems) =>
@all = (activize(poem, config.display) for poem in poems)
display = route.params.display or config.display
@all = (activize(poem, display) for poem in poems)
@heading = config.heading
@