Skip to content

Instantly share code, notes, and snippets.

@durbon
Created August 1, 2012 13:36
Show Gist options
  • Save durbon/3226871 to your computer and use it in GitHub Desktop.
Save durbon/3226871 to your computer and use it in GitHub Desktop.
miServicio.primeraLlamada(parametro1)
.then(
function (resultado1) {
// Gestionamos el exito de la primera llamada haciendo
// una segunda llamada asincrona
return miServicio.segundaLlamada(parametro2);
})
.then(
function (resultado2) {
// funcion invocada si hay exito en la segunda llamada
},
function (error) {
// funcion invocada si hay un error en la segunda llamada
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment