I noticed that in the StarterKit 8.2.9 sample project there is support for .net 8. Great news! Thank you!
I also tried it with .net 9 and it works fine, however pages that have paths at more than one level are not displayed.
It also happens in the StarterKit, for example for the "/dashboards/delivery" page.
Using a single level, like "/signin" this works.
This is causing this problem by setting the rendermode for the Routes object in App.razor<Routes rendermode="new InteractiveServerRenderMode(prerender: false)" />
Setting prerender to true do solve this problem.
This is not a real question, just let you know.
Is there a specific reason for setting prerender: false? Performance?
Sorry, I was wrong.
The starterkit project does not work correctly in the use of paths.
By setting the prerendering, the page is correctly displayed, but it does not work, because the call to the blazor script takes the wrong path.
This happens if you enter the page directly, without navigating through the links.<script src="_framework/blazor.web.js"></script>
gets a relative path and does not find _framework
Maybe I found a solution.
In my opinion you should alter the App.razor file adding <base href="/" />
in the head html
and change false to true for Routes prerender<Routes @rendermode="new InteractiveServerRenderMode(prerender: true)" />
Hi,
Sorry for the late reply.
If your server uses relative paths, adding <base href="/" />
should resolve the issue.
The prerender: true
setting determines the render mode. When set to true
, your component will be prerendered on the server. However, both prerender: true
and prerender: false
should function correctly depending on your use case.
Did you encounter any errors when setting prerender
to false
?
Regards,
Lauris Stepanovs,
Keenthemes Support Team
yes I did.
When I try to open /dashboards/delivery it is blank.
The component corresponding to @page "/dashboards/delivery"
is not rendered.
So I choose to set it to true.
I'm using .net 9, I did non test with 8.
Thank you!
Hi,
Thank you for your feedback.
We will investigate this further and if there is an issue related to our codebase we will fix it in the next Metronic release.
Regards,
Lauris Stepanovs,
Keenthemes Support Team