Store whole config in poems service

This commit is contained in:
Vit Brunner
2014-12-23 08:19:29 +01:00
parent 2914a7c1e2
commit bef3bfcfcd
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
angular.module("sideBySide").factory "load",
['filter', 'fetch', 'poems', (filter, fetch, poems) ->
['filter', 'fetch', 'poems'
(filter, fetch, poems) ->
# Load poems
#
# @param base [String] Path to config file directory
@@ -22,6 +23,6 @@ angular.module("sideBySide").factory "load",
config.fetchedPoems.then (poemList) ->
disp = display or config.data.display
poems.all = (activize(poem, disp) for poem in poemList)
poems.heading = config.data.heading
poems.config = config.data
filter.update()
]