I have a very simple app so far, but I can’t figure out how to fix the overlapping of the content (header on top of the content). I have created a component header
that contains the header as the name suggest.
header.html
<ion-header>
<ion-navbar color="dark">
<ion-title>
Some Title
</ion-title>
</ion-navbar>
</ion-header>
I have been trying to use it on different pages, but it always overlaps the content of the page.
page.html
<app-header></app-header>
<ion-content padding>
<h1>Some Page</h1>
</ion-content>
I have tried using div
tag instead of ion-content
, and also tried using class="has-header"
, but nothing seems to be working. Although, if don’t use the header
as a component such as the following, it works fine. But I want to use the header
as a component so that I can reuse it on other pages.
page.html (don’t want to have it like this)
<ion-header>
<ion-navbar color="dark">
<ion-title>
Some Title
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<h1>Some Page</h1>
</ion-content>