Last active
August 29, 2015 14:08
-
-
Save rmcauley/5e462ee589d16df18214 to your computer and use it in GitHub Desktop.
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
ngApp.factory("someResource", function($resource) { | |
var res = $resource("/some/url/:id", { id: '@id' }); | |
res.prototype.blerch = function() { console.log(this.id); }; | |
// possibility 1 | |
res.attr1 = "hello"; | |
return res; | |
}); | |
var someResourceResolve = function($resource, $stateParams, someResource) { | |
return new someResource({ 'id': $stateParams.id }).$get(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment