angularjs - Put Object in Restangular -
you see below code change record db using restangular.
restangular.one("/mywebsite/bin/server.fcgi/rest/players", "70").get().then(function(c){ $scope.content = c; }) $scope.content.name= "asqan"; $scope.content.put(); when try put last line of code, gives error:
put http://localhost/mywebsite/bin/server.fcgi/rest/players 404 (object not found) ps: no other issue adding or getting.
you should in function,
restangular.one("/mywebsite/bin/server.fcgi/rest/players", "70").get().then(function(c){ $scope.content = c; $scope.content.name= "asqan"; $scope.content.put(); })
Comments
Post a Comment