angularjs - Restangular put method with extra route don't send data -


i'm wondering what's wrong snippet:

(my goal if send put request user/14/account data update of course)

.controller('useraccountctrl', ['$rootscope', '$scope', '$state', 'user','user','restangular',         function($rootscope, $scope, $state, user, user, restangular) {             $scope.user = restangular.one('user',14).get().$object;             $scope.errors = null;               $scope.save = function(){                $scope.user.one('account').put();             };         }     ]); 

i've got call user/14/account without data :(

update

this seems work

var user = restangular.one('user',14).one('account'); 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -