ngResource calling file.txt succeed but calling a web service are fails
headers:
result: 200 and the response body: get the json
but the controller are empty
angular.module('myService', ['ngResource']).
factory('monthData', ['$resource', function ($resource) {
var
// succeed
getMonthContent = $resource('monthContainerJson.txt', {}, {
query: { method: 'GET', format: 'json', params: {}, isArray:
false }
})
// FAILS
, getMonthTestContent = $resource('ws.asmx/getMonthTest'
, {}
, { query: { method: 'GET',
format: 'json', params: {}, isArray: false } }
)
//, postMonthContent = $resource('../data/countries.json/:id', {}, {
// query: { method: 'GET', format: 'json', params: { id: '@id' },
isArray: false }
//})
;
return {
getMonth: getMonthContent
, getMonthTest: getMonthTestContent
//, postMonth: postMonthContent
};
}]);
var modulMonth = angular.module('modulMonth', []);
modulMonth.controller("fullMonthCtrl", ['$scope', 'monthData',
function ($scope, monthData) {
$scope.Month = monthData.getMonthTest.query();
}]);
any ideas????
--
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.