mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-11 12:44:22 +08:00
Split poem loading
This commit is contained in:
@@ -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
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user