I'm encountering a syntax error while attempting to fetch the user's location in AngularJS using an AJAX call.
app.controller('locationController', function($scope, $window) {
$window.navigator.geolocation.getCurrentPosition(function(position) {
console.log(position);
var lat = position.coords.latitude;
var long = position.coords.longitude;
$scope.$apply(function() {
$scope.lat = lat;
$scope.long = long;
});
});
var city = function() {
http.get("http://maps.googleapis.com/maps/api/geocode/json?latlng="
lat ","
long "&sensor=true").success(function(response) {
console.log(response);
});
}
});
The specific error I'm facing is related to tokens; it requests deleting a token.