Skip to content

Instantly share code, notes, and snippets.

@RubyRonin
Created April 4, 2017 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RubyRonin/993e3b3309c7708db4cff81ad61ae142 to your computer and use it in GitHub Desktop.
Save RubyRonin/993e3b3309c7708db4cff81ad61ae142 to your computer and use it in GitHub Desktop.
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