Ionic angular - ng-content / content-projection changes presentation of interface

Viewed 42

I had a component with html as follows:

<ion-header>
    <header></header>
</ion-header>
<ion-content [fullscreen]="true">
    <div>
        <tab></tab>
        <div class="content">
            ...
        </div>
    </div>
</ion-content>

Now I change this into a parent-component:

<ion-header>
    <header></header>
</ion-header>
<ion-content [fullscreen]="true">
    <div>
        <tab></tab>
        <div class="content">
            <ng-content></ng-content>
        </div>
    </div>
</ion-content>

and the new child:

<parent>
    ...
</parent>

But now the interface looks different, the styling doesn't work. I'm used to react thus behaviour confuses me. I've tried add ViewEncapsulation.None but it doesn't change anything. What I ideally want is for the rendered content to work like normal HTML would.

0 Answers
Related