Reputation: 727
Basically i have explored how we can use get and post in api's using ionic2.
But i have been stucked seriously on how to go to welcome screen after authentication.
This is my html:
<ion-content>
<ion-list>
<ion-label>Username</ion-label>
<input type="text" name="username" [(ngModel)]="model.username">
<ion-label>Password</ion-label>
<input type="password" name="password" [(ngModel)]="model.password"><br><br><br>
<button round block (click)="submit()">Submit</button>
</ion-list>
</ion-content>
Upvotes: 2
Views: 1076
Reputation: 7724
on your ts file
import your welcome screen class and write the below function
import { NavController } from 'ionic-angular';
constructor(public navCtrl:NavController){}
submit(){
this.navCtrl.push(WelcomeScreen,{});
}
you can use push pop and setRoot depending upon your need to know more about navigation in ionic please refer this link http://ionicframework.com/docs/v2/api/navigation/NavController.
Upvotes: 3