app service CountriesService resource function resource var resource r

1
2
3
4
5
6
7
8
9
app.service('CountriesService', ['$resource', function($resource) {
var resource = $resource('/api/preferences/countries/');
this.countries = resource.query();
this.getCountries = function() {
return this.countries;
}
}]);