Answer the question
In order to leave comments, you need to log in
How to get rid of SyntaxError: Unexpected token v?
simple post:
$http.post('main.php', { uid: $scope.uid, avatar: $scope.avatar } ).success(function (data) {
console.log(data);
});
Answer the question
In order to leave comments, you need to log in
look at what comes from the server, apparently this is a JSON parsing error, because the code seems to be all right (except for using the scope, calling $http from the constructor...)
I will assume that you copy-pasted something somewhere using ctrl / cmd + v and once again inserted the letter by releasing the control key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question