angularjs - POSTing and PUTing a restangular object -
i trying create new restangular object, post it, modify , put it. $scope.new_message = restangular.one('messages'); // should post $scope.new_message.save().then(function(message){ $scope.new_message = message; }); // should put $scope.new_message.subject = "hello world"; $scope.new_message.save() unfortunately restangular sending put request to http:/localhost/messages/undefined/5481ebbfe252e4116a8334d0 when should be http://10.211.55.3/messages/5481ebbfe252e4116a8334d0 it seems use .one() must include id 1 of parameters. question is, how can leverage .save() functionality without using id