Ionic3 Tabs pass params subscribe

Hello everyone, I’m trying to pass a parameter from the main page to the Tabs through the rootParam, but it is not working. Below is the code:


  selector: 'page-perfil',
  templateUrl: 'perfil.html',
export class PerfilPage {

  tab1 : any;
  tab2 : any;
  tab3 : any;

  public profile : ProfileDTO;

  constructor(public navCtrl: NavController, 
    public navParams: NavParams, 
    public usuarioService: UsuarioService) 
          this.tab1 = 'GeralProfilePage';
          this.tab2 = 'EnderProfilePage';
          this.tab3 = 'OtherProfilePage';
 = this.profile

  ionViewDidLoad() {

  showProfile() {
      response => {
          this.profile = response;
      error => {console.log(error)}

As you can see, the profile is retrieved in subscribe. So in the constructor I try to extrude it to this.profile. Below is the html (profile.html):

<ion-content padding>
        <ion-tabs color="primary">
        <ion-tab [root]="tab1" tabIcon="information-circle" [rootParams]="profile"</ion-tab>
        <ion-tab [root]="tab2" tabIcon="home" [rootParams]="profile"></ion-tab>
        <ion-tab [root]="tab3" tabIcon="bookmarks" [rootParams]="profile"></ion-tab>

finally the files referring to the first tab as an example:


<ion-content padding>
       nome: {{profile?.nome}}


  selector: 'page-geral-profile',
  templateUrl: 'geral-profile.html',
export class GeralProfilePage {

  profile: any;
  constructor(public navCtrl: NavController, public navParams: NavParams) {
    this.profile =

  ionViewDidLoad() {

The parameter value is empty. How to pass the value returned in subscribe to the this.profile parameter, and then send it to the tabs?


This is impossible to do as you’re attempting to, so what I would do instead is to instead have each of the pages inject UsuarioService and grab the profile from there directly. PerfilPage doesn’t need to be involved.

Okay, I’ll do it this way, thank you very much for the return