I can’t figure out how can i pass data from a login page form to a tab in Ionic. This is my code that holds the data and should push it to the tabs, but it doesn’t work.
Login Page
export class LoginPage {
private login : FormGroup;
constructor(public navCtrl: NavController, private formBuilder: FormBuilder) {
this.login = this.formBuilder.group({
username: ['', Validators.required],
password: ['', Validators.required],
});
}
goToVoti(){
this.navCtrl.push(TabsControllerPage, {
username: this.login.value.username,
password: this.login.value.password});
}
}
Do i have to pass the data to the TabsController first and then to the desired page(s)? If yes, how?