Created
February 8, 2018 17:44
-
-
Save Matheus-de-Souza/8eda401c71e7fdeece656f1061227e65 to your computer and use it in GitHub Desktop.
GeoIp
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
$http | |
.get("http://ipinfo.io", { jsonp: true } ) | |
.then(function(response) { | |
var countryCode = (response.data && response.data.country) ? response.data.country : ""; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment