Split poem loading

This commit is contained in:
Vit Brunner
2014-12-21 21:14:13 +01:00
parent 7dfc54ff97
commit f3860664a6
5 changed files with 36 additions and 32 deletions
+3 -4
View File
@@ -2,7 +2,7 @@ angular.module("sideBySide").factory "fetch", ['$http', '$q', 'readerFactory', (
# Fetch
#
# @param base [String] Path to config file directory
# @return [Object] Promises and heading
# @return [Object] Promises and config data
(base) ->
file = base + '/config.json'
$http.get(file).then (config) ->
@@ -11,8 +11,7 @@ angular.module("sideBySide").factory "fetch", ['$http', '$q', 'readerFactory', (
readerFactory(poem) response.data
{
fetchPoems: $q.all promises
heading: config.data.heading
display: config.data.display
fetchedPoems: $q.all promises
data: config.data
}
]