Created
June 15, 2014 04:06
-
-
Save evan-007/b8fd23847758a4aa3f13 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
.factory('owmNearby', ['owmRequest', '$interpolate', 'OWM_LAT_LNG_PATH', | |
function(owmRequest, $interpolate, OWM_LAT_LNG_PATH) { | |
return function(lat, lng) { | |
var path = $interpolate(OWM_LAT_LNG_PATH)({ | |
lat : lat, | |
lng : lng | |
}); | |
return owmRequest(path); | |
} | |
}]) | |
first return means that it's called like owmNearby(lat, lng) | |
and returns 'path' | |
2nd return is the return from the service? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment