Created
April 18, 2015 11:07
-
-
Save aurbano/ce4f95e0076763b5e9c6 to your computer and use it in GitHub Desktop.
AngularJS returning data from an endpoint as a resource
This file contains hidden or 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.module('serviceName', []) | |
.factory('resourceName', ['$resource', | |
function($resource) { | |
var status = $resource('/endpoint'); | |
return status.get().$promise; | |
} | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment