@leorjoseph wrote:
I have been trying so hard to make this work, not sure why this is not working. Below is the code which am using,
import {Http, Response, RequestOptions, Headers} from "@angular/http"; loginCompleted() { console.log("loginCompleted()"); this.navCtrl.push(TabsPage); } login(callback) { this.http .post("", body.toString(), options) .subscribe(function(response) { console.log("Login Response",response); this.loginResponse = JSON.parse(response.text()); callback }); }
Am trying to make a simple HTTP Post call and based on the response I want to push the TabsPage. But whats happening is Tabs page is getting pushed immediately after the HTTP post call is made. Can anyone tell what is the problem.
Posts: 1
Participants: 1