Skip to content

Instantly share code, notes, and snippets.

@JoaoVagner
Created March 4, 2017 22:46
Show Gist options
  • Save JoaoVagner/582d46d9eddd61af85c4b2f088b11082 to your computer and use it in GitHub Desktop.
Save JoaoVagner/582d46d9eddd61af85c4b2f088b11082 to your computer and use it in GitHub Desktop.
var services = angular.module('ecofit.services', ['ngResource'])
.factory('Session', function ($resource) {
return $resource('http://localhost:8010/sessions/:sessionId');
// return $resource('http://ecofit-api.joaovagner.com.br/sessions/:sessionId');
})
.factory('News', function ($resource) {
return $resource('http://www.ecofit.com.br/noticias/mobile.json');
// return $resource('http://ecofit.com.br/noticias/mobile.json');
// return $resource('http://ecofit-api.joaovagner.com.br/news/:slug');
})
.factory('Sports', function ($resource) {
return $resource('http://localhost:8010/sports/:slug');
// return $resource('http://ecofit-api.joaovagner.com.br/news/:slug');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment