Created
May 22, 2014 07:12
-
-
Save aabes/9419a1910b0c52df74d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch_meta: (scope, url, var_name)-> | |
deffered = $q.defer() | |
# fetch a piece of data from the server, and store it into a scope variable | |
$http.get(url). | |
success((data, status, headers, config) -> | |
svc.load_object_from_server(scope, data, var_name, true, deffered)). | |
error((data, status, headers, config) -> | |
svc.load_object_from_server(scope, data, var_name, false, deffered)) | |
deffered.promise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment