Blazor dotNet 8 Integration to Existing project Guide
I want to add Metronic to my current dotNET 8 Blazor project but I can not find any instructions for doing this. The only guide available is for the StarterKit not for an existing project.
Replies (1)
Hi,
Sorry for the delay in reply.
The Metronic implementation flow depends on your project requirements, but here are some general guidelines for using Metronic in your existing project.
Include the mandatory global style files:
plugins/global/plugins.bundle.css
css/style.bundle.css Include the mandatory JS files:
plugins/global/plugins.bundle.js
js/scripts.bundle.js Initialize our JS components in the OnAfterRenderAsync task:
@code{
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender) {
await JS.InvokeVoidAsync("KTComponent.init");
}
}
} Copy the HTML markup from our HTML version. Also, you can use the Layout Builder to easily generate the layout markup of your choice.
Regards,
Lauris Stepanovs,
Keenthemes Support Team