Skip to content

Instantly share code, notes, and snippets.

@asicfr
Created November 4, 2014 20:30
Show Gist options
  • Save asicfr/9676d03562e1e34ccb6d to your computer and use it in GitHub Desktop.
Save asicfr/9676d03562e1e34ccb6d to your computer and use it in GitHub Desktop.
var myService = function($http, $q, $timeout) {
this.doItAsync = function() {
var deferred = $q.defer();
...
return deferred.promise;
};
};
angular.module('global.services', []);
myService.$inject = ['$http', '$q', '$timeout'];
angular.module('global.services').service('myService', myService);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment