Hello.
I managed to create Blazor WASM application with Metronic theme and kit. I have now few errors:
Unhandled exception rendering component: Could not find a part of the path '/wwwroot/assets/media/icons/duotune/arrows/arr061.svg'.
I assume this has something to do with how Blazor WASM access to data/files. After some debugging I found out problem is this function in KTTheme.cs file
public string GetSvgIcon(string path, string classNames)
{
var svg = System.IO.File.ReadAllText($"./wwwroot/assets/media/icons/{path}");
return $"{svg}";
}
How should I patch this function, so I can access files from this file?
Unhandled exception rendering component: Could not find 'KTChartsWidget8.init' ('KTChartsWidget8' was undefined).
I found in other question, that I need to change OnAfterRenderAsync function.
I changed it and it now looks like this
protected override async Task OnAfterRenderAsync(bool firstRender)
{
//if(firstRender){
// await JS.InvokeVoidAsync("KTChartsWidget8.init");
//}
JS.InvokeVoidAsync("KTChartsWidget8.init");
}
I don't get error anymore, but chart is still not rendering. Am I missing something?
href="?page=dashboards/ecommerce", shouldn't they point to /dashboards/eccomerce ?Thanks for answer!
Hi Lauris, thanks for answers.
BR
Hi,
<SvgIcon IconPath="assets/media/icons/duotune/arrows/arr061.svg" /> KTChartsWidget8 initializes chart widget-8, for other widgets use different instances.console.log displaying element variable of Starterkit/_keenthemes/src/js/widgets/charts/widget-8.js, then check result in your browser's console.Hi,