Hi,
I have a problem with a little code in AngularJS
This is the code:
<script>
angular.module('starter', []).controller('TakeGPSData', [
'$http','$scope', function($scope, $http) {
$scope.myGPS = {};
$scope.myGPS = function() {
var responsePromise = $http.post('http://ServerIP:5000/sendreport',
angular.toJson(gpsSuccess));
responsePromise.success(function(data, status, headers, config) {
$scope.myGPS.fromServer = data.title;
});
responsePromise.error(function(data, status, headers, config) {
alert('AJAX failed!');
});
}
}]);
</script>
so when I click my button
<button ng-click="myGPS" class="button button-block icon-left ion-checkmark
button-balanced">Send</button>
the Server will notice in the log that it received a POST but the Server
didn't it
why?
my AngularJS code is bad? where?
Thank for your answers
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.