Skip to content

Instantly share code, notes, and snippets.

@Matheus-de-Souza
Created February 8, 2018 17:44
Show Gist options
  • Save Matheus-de-Souza/8eda401c71e7fdeece656f1061227e65 to your computer and use it in GitHub Desktop.
Save Matheus-de-Souza/8eda401c71e7fdeece656f1061227e65 to your computer and use it in GitHub Desktop.
GeoIp
$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