SpReeD
✅ Blazor and Javascript loading
So, I have a main page and a separate adminpage. On navigating to the admin site it changes the layout to
AdminLayout.razor
which inherits from @inherits LayoutComponentBase
. So far, so good, the adminpage inlcudes @layout AdminLayout
and everything is displayed correctly.
The AdminLayout also has several JS includes at the end of body
.
It seems that after first navigation those scripts aren't loaded, the behaviour is as followed:
- Navigate to admin page
- Click on a <a href="#">
that should expand a collapsed div, but it doesn't
- Reload/Refresh the page after it's initial load and it works as expected
Switching the rendermode to Server and Server without prerender haven't helped here.
Navigating to the adminpage via NavigationManager
, could this be an issue?11 replies
✅ Blazor / ASP.NET - @inject keyed service
Is there a way in .NET 8 to inject a keyed service like a normal service with the
@inject
keyword?
I know of the FromKeyedServices
attribute, but cannot figure out how to use it in combination with @inject
.
I thought of a way like @inject [FromKeyedServices("MyService")] ServiceClass FooBar;
6 replies
The best-practice way to use a plausibility check
So, I have the following class
Is it okay to throw in the setter of the properties or is it somehow "better" to check this in the constructor?
Logically spoken, both values won't ever change, but may be "corrected" if inserted wrongly in the database.
3 replies
Is "System.IO.IsolatedStorage" still a thing in .NET?
I'm wondering if the usage of Isolated storage is still something, someone could consider using today.
Plus, is there finally a way to make it persistent across version changes of the application, or do we still need an "updater" software?
However, I'm free to hear some alternatives 🙂
How you would store a local Highscore Database/File?
5 replies