I have a module...
angular.module(\'myModule\', []);
And then a factory
angular.module(\'myModule\')
.factory(\'factory1\', [
This is what i did and worked fine. Call SessionPresenters from Session
angular.module('tryme3App')
.factory('Session', function ($resource, DateUtils, SessionPresenters) {
return $resource('api/sessions/:id', {}, {
'query': { method: 'GET', isArray: true},
'get': {
method: 'GET',
transformResponse: function (data) {
data = angular.fromJson(data);
var result = SessionPresenters.get({id: data.id})
data.presenters = result;
return data;
}
},
'update': { method:'PUT' }
});
}).factory('SessionPresenters', function ($resource, DateUtils) {
return $resource('api/session.Presenters/:id', {}, {
'query': { method: 'GET', isArray: true},
'get': {
method: 'GET', isArray: true
},
'update': { method:'PUT' }
});
});