Last active
August 29, 2015 14:06
-
-
Save chris-skud/336a8edf1a24fae9be4d 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
function get() { | |
var prom = $http({method:'GET', url: 'test.json'}) | |
.then(function(data) { | |
//set local value with returned data | |
vals = data; | |
// and return to caller so they can .then(function(data){}) | |
return vals; | |
}, function(err) { | |
console.log(err); | |
return err; | |
}); | |
return prom; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment