Created
August 25, 2015 19:26
-
-
Save Epotignano/55530bf8a75aac3c2191 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
/*** inside Angular **/ | |
var someService = function($q, $http) { | |
var service = this; | |
service.findSomething = function(query) { | |
var somePromise = $q.defer() | |
$http.get(/*something well done here */).then(function(data){ | |
somePromise.resolve(data); | |
}) | |
return somePromise.promise | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment