Hi

I have a problem with POST and PUT data to database by REST service.
I have loan and customers for it.
I try to save data by PUT JSON like this:

id 
 1
idCustomers 
Object { firstname="iou", id=19, name="iou iuoih", więcej...}
firstname
"iou"
id
19
name
"iou iuoih"
surname
"iuoi"
value
100

but the update comes only for parent data.

My controler looks like this:
app.controller('UserDetailCtrl', ['$scope', '$routeParams', 'UserFactory', 
'$location',
  function ($scope, $routeParams, UserFactory, $location) {

    /* callback for ng-click 'updateUser': */
    $scope.updateUser = function () {
      UserFactory.update($scope.user);
      $location.path('/user-list');
    };

    /* callback for ng-click 'cancel': */
    $scope.cancel = function () {
      $location.path('/user-list');
    };

    $scope.user = UserFactory.show({id: $routeParams.id});
  }]);

Can you help me?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to