Hide element based on back button


Hey guys!

I am completely new to Ionic 2 and angular 2, so I am a bit lost. I have a header component that is reused on bunch of pages. I have a logo there (on the far left of the header, but I wanna hide the logo if the page has back button (meaning the page was pushed to the navigation controller - I hope this is right definition).

I think I could come up with some hacky solutions, but I figured it would be better to ask.

Thank you all for your answers.


Ok, I am replying to my own question, but I think I found the way:

ViewController.enableBack() return whether a page has back button or not, I pass this to the component and display logo based on this value.


Hey can you provide code with this? I’am looking for a solution for this!