mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-10 12:37:06 +08:00
Move source/documents/* to source/
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
angular.module("sideBySide").factory "fetch", ['$http', '$q', 'readerFactory', ($http, $q, readerFactory) ->
|
||||
# Fetch
|
||||
#
|
||||
# @param file [String] Path to config file
|
||||
# @return [Object] Promises and heading
|
||||
(file = "/config.json") ->
|
||||
$http.get(file).then (config) ->
|
||||
promises = config.data.files.map (poem) ->
|
||||
$http.get(poem).then (response) ->
|
||||
readerFactory(poem) response.data
|
||||
|
||||
{
|
||||
fetchPoems: $q.all promises
|
||||
heading: config.data.heading
|
||||
active: config.data.active
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user