but I have before to make login, get profile something like this:
if(authenticated && user.profile == ‘lawyer’)
this.navCtrl.setRoot(LawyerPage);
if(authenticatedd && user.profile == ‘citizen’)
this.navCtrl.setRoot(CitizenPage);
@fishi Sorry, so, I have 2 button with parameters login.html
<ion-row>
<button ion-button color="danger" full large *ngIf="profile == 'Citizen'" (click)="navigateTo(profile)">New Citizen</button>
</ion-row>
<ion-row>
<button ion-button color="danger" full large *ngIf="profile == 'Lawyer'" (click)="navigateTo(profile)">New Lawer</button>
</ion-row>
Where I pass the user profile Login.ts
constructor(public formB: FormBuilder, public navCtrl: NavController, public navParams: NavParams, public authService: ServiceProvider, public alertCtrl: AlertController) {
this.profile = this.navParams.get('profile');
this.dataForm();
}
I want that the User Lawer make login and to be redirect to PageLawer and Citize to be redirect for CitizenPage for example
Ex: if(authenticated && this.profile == user.profile)
redirect (userPage)