angularjs - ngResource PUT action isn't executed -
i have created following controller
(function() { 'use strict'; angular .module('app') .controller('donecontroller', done); done.$inject = ['$scope', '$stateparams', 'preference']; function done($scope, $stateparams, preference) { // put preference.savepreference({ action: 'purchased', model: $stateparams.model }); } }());
which call following service
(function() { 'use strict'; angular .module('app') .factory('preference', preferenceservice); preferenceservice.$inject = ['$resource']; function preferenceservice($resource) { return $resource("http://localhost:8000/preferences", null, { savepreference: { method: 'put' } }); } }());
the server expect following request
http://localhost:8000/preferences?action=puchased&model=id
the problem isn't executed , don't know why. have idea? server up.
Comments
Post a Comment