Created
September 30, 2014 14:51
-
-
Save scottweisman/4e2cbb3126ee40e6404c to your computer and use it in GitHub Desktop.
Angular vs Ember Factories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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