Bonjour tout le monde,

j'ai développé un service pour envoyer un document json voici le code:

.factory('Indexmetadata', ['$resource', function ($resource) {

          return $resource('http://localhost:8080/document/indexMeta', {}, {

            'update': {method: 'POST',data:'@document',contentType: 
'application/json'}
        })
    }]);


et j'espère l'utiliser :

 .controller('FactureCtrl', function ($scope,Indexmetadata) {

          $scope.document={};

        $scope.indexMeta = function () {

          Indexmetadata.update({},document)
     
        }
        });

J'ai utilisé plusieurs méthodes mais je n'arrive pas.
Comment je peux passer 'document' (qui est un json) en paramètre?

merci d'avance :)

-- 
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