Mohammad
1 min readMay 5, 2018

--

Good article beeman.

However, I believe it’s better to avoid using content projection and use router outlet, so instead of:

<app-header></app-header>
<div class="container">
<ng-content></ng-content>
</div>
<app-footer></app-footer>

Do:

<app-header></app-header>
<div class="container">
<router-outlet></router-outlet>
</div>
<app-footer></app-footer>

This way you don’t have to add <app-layout> for every top level component.

Cheers :)

--

--