Skip to content

Instantly share code, notes, and snippets.

@scottweisman
Created September 30, 2014 14:51
Show Gist options
  • Save scottweisman/4e2cbb3126ee40e6404c to your computer and use it in GitHub Desktop.
Save scottweisman/4e2cbb3126ee40e6404c to your computer and use it in GitHub Desktop.
Angular vs Ember Factories
// Angular
app.factory("User", ['$resource', function($resource){
return $resource('/companies/:company_id/members/:id', { company_id: '@company_id', id: '@id' });
}]);
app.factory("Group", ['$resource', function($resource){
return $resource('/companies/:company_id/groups/:id.json', { company_id: '@company_id', id: '@id' });
}]);
// Ember
// You don't have to do any of this in Ember. Ember's knows where to find data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment