setRoot for app.Component from other page ( ionic V2)


#1

hi ,
My app.html contains a menu , i want to invoke MyApp class ( app.component.ts) from HomePage using this.navCtrl.setRoot(); .Which parameters should have setRoot and what is the import tag in the head of HomePage?


#2

I suggest not doing this. It makes your code hard to read and test. Instead, use some sort of shared event mechanism like this.