rest - AngularJS POST 404 -
i using angularjs connect service, deployed on same server. have followed every suggestion listed in posts related similar error, cors, has not solved problem. though, service called asynchronously, response received before server gets chance handle it. missing?
here service
services.factory('testservice', function($http) { var myservice = { createtag: function(tag) { return $http.post('/temptag', tag); } }; return myservice; });
any controller looks this:
app.controller('tagctrl', function ($scope, testservice,$location) { $scope.tag={}; $scope.createtag = function () { testservice.createtag($scope.tag).then (function(data){ console.log('data success: = ' + data); }, function(data){ console.log('data = failure ' + data); }); };
});
the control goes "data success:" data undefined
Comments
Post a Comment