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

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -