Bartekziom5's Posts
Nairaland Forum › Bartekziom5's Profile › Bartekziom5's Posts
1 (of 1 pages)
trytillmake:yes |
pcguru1:An error occurred, please try again or contact the administrator. Error details: Cannot convert type 'double' to 'System.Collection this is what logs tells me. Im using backand as backend. |
Hi I'm trying to add points to my Ionic app database. To do that I'm getting existing points from database and add them to the points that I will input. After I want to update those summed points to my database.With my code the browser is giving me error: "server responded with status 500 critical exception" if you have any idea how please help me solve this problem. (The $scope.points and $scope.input datatype is float) This is my code: .controller('AppCtrl', function($scope, PointService) { $scope.points = []; $scope.input = {}; function getAll() { PointService.getPoints() .then(function (result) { $scope.points = result.data.data; }); } $scope.updatePoints = function() { $scope.sum = parseFloat($scope.points) + parseFloat($scope.input); PointService.addPoints($scope.sum) .then(function(result) { $scope.input = {}; getAll(); }); } |
1 (of 1 pages)