Install Layout Builders file in the Metronic8 angular project
How to install the newly generated files from Metronic8 layout builder in the angular project. Can you please provide the steps to install and any example would be good ?
Thanks,
Balaji
Replies (1)
Deleted comment
Deleted comment
Hi Balaji
Sorry for the delay. If you're using the exported partial files from the Metronic 8 Layout Builder, you can use them into your new generated Angular project.
Run the following command in your terminal or command prompt:
ng new my-angular-project
create a layout module:
ng g module layout
This will create a layout folder inside src/app/ and a layout.module.ts file.
Run the following commands to generate components:
ng g c layout/header
ng g c layout/sidebar
ng g c layout/footer
ng g c layout/content Open app.module.ts and register the newly added components:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HeaderComponent } from './layout/partials/header/header.component';
import { SidebarComponent } from './layout/partials/sidebar/sidebar.component';
import { FooterComponent } from './layout/partials/footer/footer.component';
@NgModule({
declarations: [HeaderComponent, SidebarComponent, FooterComponent],
imports: [CommonModule],
exports: [HeaderComponent, SidebarComponent, FooterComponent]
})
export class LayoutModule { }
Modify src/app/app.component.html to include your new layout:
<app-header></app-header>
<app-sidebar></app-sidebar>
<div class="content-wrapper">
<app-content></app-content>
</div>
<app-footer></app-footer> Thanks