Created
July 17, 2014 02:13
-
-
Save lucasconstantino/09bec19e730b536ba0a4 to your computer and use it in GitHub Desktop.
Teste de Resolução para o Kaue
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
// Antes. | |
recipients: function(RecipientsService) { | |
return RecipientsService.getRecipients(); | |
} | |
// Depois (para testar). | |
recipients: function(RecipientsService) { | |
var promise = RecipientsService.getRecipients(); | |
promise.then( | |
function (res) { console.log('Funfo! Promessa resolvida...'); }, | |
function (res) { console.log('Aaaah, desgraçada, falho mêrmo!'); } | |
); | |
return promise; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment