Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test() {
this.http.get("https://myapi.com/?question=3", {headers: headers})
.map(res => res.json()).subscribe(data => {
this.rcvdpayload = data.data.children; console.log(this.rcvdpayload);
}, error => {
console.log(JSON.stringify(error.json()));
});
}
ionViewWillEnter(){
this.compnentvar = this.services.getQuestion();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment