Created
July 19, 2017 02:14
-
-
Save alphanetEX/7d3745b1d2ccc0f6fef4daa72fdaf7ca to your computer and use it in GitHub Desktop.
get tiendas // vtr robles
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
getTiendas() { | |
this._tiendaService.getTiendas() | |
.subscribe( | |
result => { | |
this.tiendas = result.data; // se guardara la informacion en el modelo de datos | |
this.status = result.status; | |
if (this.status !== "success") { | |
alert("Error conectando con la api!!!") | |
} | |
else { | |
} | |
}, | |
error => { | |
this.errorMessage = <any>error; | |
if (this.errorMessage != null) { | |
console.error(this.errorMessage); | |
alert("Error en la peticion"); | |
} | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment