Pass Data through side menu?

It’s possible pass Data through side menu to another page look :

this.pages = [
      { title: 'Home', component: HomePage },
      { title: 'Meu Perfil', component: UserProfile },
      { title: 'Sair', component: Login }
    ];
    this.activePage = this.pages[0];

 getData() {
   this.service.getData().subscribe( data => {
     this.someData = data;
   });
 }

I want to pass the Data to another page, how can I do ?

@rafaelmoura You dont need to use menu to pass data to another page.
You can use NavParams

So, but I will pass params in app.components specifically, when I use NavController I see the followig error:

"No provider for NavController!"
I’m testing in this method than I created

openTeste(p) {
    this.navCtrl.setRoot(p, { user: 'rafael'});
  }

You must use @ViewChild to access navigation in the app component. See the conference app.

1 Like