Closed novasdream closed 9 years ago
House is this
DevAAC.factory('House', ['$resource',
function($resource){
return $resource(ApiUrl('houses/:id'), {}, {
get: { cache: true },
query: { isArray: true, cache: true },
bid: { url: ApiUrl('houses/:id/bid'), method: 'POST' }
});
}
]);
house is resolved here:
house: function(House, $route) {
return House.get({id: $route.current.params.id}).$promise;
}
@TheSumm So Player come from Factory in Player.js ?
where that code get data from webservice ?
It's automatically fetched by ngResource from API. The URL is defined here:
return $resource(ApiUrl('houses/:id'), {}, {
https://github.com/DevelopersPL/DevAAC/blob/master/public_html/modules/houses/houses.js
I check in angularjs docs and cant found something like that.
where it comes from 'House' ?
I can see house (lowercase) come from