I am integrating html template into angular 8. I have created header, footer and sidebar component using CLI and paste header, footer and sidebar html code respectively into components. Then I have call them into app.component.html file like below:
<div id="main-wrapper">
<app-header></app-header>
<app-left-sidebar></app-left-sidebar>
<app-footer></app-footer>
</div>
Then I have created one static folder into src/ named views. I have placed all my html files into this folder like home.html, about.html, contact.html etc... Now, when I am calling home.html into app.component.html like below:
<div id="main-wrapper">
<app-header></app-header>
<app-left-sidebar></app-left-sidebar>
<div *ngIf="pageSlug == 'home'" ng-include="../views/home.html"></div>
<div *ngIf="pageSlug == 'about'" ng-include="../views/about.html"></div>
<div *ngIf="pageSlug == 'contact'" ng-include="../views/contact.html"></div>
<app-footer></app-footer>
</div>
But including path like above not working. Any body let me know how can I achieve this and also I want to know is this correct way to integrate html template like this or we need to create component for all like home component, about component and contact component.
Thanks in advance for your time.