Same header for all pages

I would like to have the same header for all pages.

Whats the best way to do it without having to repeat the html + code in all pages.

Thanks!

1 Like

That is a question i am also interested in. If there is a concept for default layouting, like the same footer & Header on multiple pages. But with the possibility to override them.

Having a different header for each page is a design decision we’ve made.
In Ionic 1, a common issue was that having a single header/navbar wasn’t flexible enough for people.
You couldn’t really do anything dynamic like change header color, and animations were very difficult to coordinate.

The way ionic 2 handles things now is much better.

1 Like

If you would like to have the same header any way see these answers:

1 Like

yeah and i think the solution will destroy navbar handling :wink:

The way I did this was by creating a new component to be my header. I just pass the title I want to show.

Yes but now header flickers between page transitions, how to prevent that?

4 Likes

It would be nice to for the Ionic Team to make the pages to inherit the App root header if they do not implement a header. this will make copying header to pages optional. Meaning that one will only implement a header within a page if one wants to override the root header

1 Like