Skip to content

PUT not putting changes when model is get through $object #579

Open
@windevalley

Description

@windevalley

restanglar v1.3.1

$scope.data = Restangular.one("collection", "1245").get().$object;
// I got back

{ 
  title: "some title"
}

$scope.data.title = "title 123";
$scope.data.put();

It will not put the changes.

But if get through promise it will work.

Restangular.one("collection", "1245").get().then(function(result) {
  $scope.data = result;
});
$scope.data.title = "title 123";
$scope.data.put(); // will work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions