angular.module('teraService', []) // super simple service // each function returns a promise object .factory('Tera', ['$http',function($http) { return { get : function() { return $http.get('/api/tera'); } } }]);