h3x4d3c1m4l / BlazorProgressIndicator

Simple loading indicator for ASP.NET Blazor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seems not to be working with Blazor ServerSide

rvdroer opened this issue · comments

I have implemented this loading indicator in a service side blazor application. The texts of the defaulttemplate is shown but the loading indicator (spinner) is not visible. There background div is also not visible. Is there a solution for this? I am currently migrating to Blazor ClientSide but this is still beta.

Hi Rogier,

  • Did you add this repo as git submodule to your project? As NuGet packages are very old (I don't have much time to update them, and Blazor is still not released as stable) I would not recommend using them
  • Can you provide me a sample project? I'll take a took asap :)

I added this repo directly, didn't even know there was a package :) I will try to send you a sample project asap.

Hi @rvdroer,

I got your message in my e-mail inbox as well, but without any attachment. Could you perhaps send me the e-mail directly to sander[at]inthout[dot]eu or otherwise upload the file somewhere (Firefox Send, WeTransfer, etc.) then send me the URL :)

Hi Rogier,

As a VR gamer the name of your sample project makes me curious about the contents :)

I found the cause of the issue and pushed a new commit to master, please:

  • Pull this new version to your project
  • Upgrade your project to .NET Core 3.1 (change netstandard2.0 to netstandard2.1 and change netcoreapp3.0 to netcoreapp3.1, make sure to upgrade the Microsoft.AspNetCore.Components NuGet refs too, this is also recommended by Microsoft as .NET Core 3.1 will be long term supported and contains additional fixes to Razor Components)
  • Add the following line in the index.html next to the other <link>-directives:
    <link rel="stylesheet" href="_content/H3x.Blazor.LoadingIndicator/defaulttemplate.css" />

Tested on both server side and client side Blazor hosting ✅. Please let me know if it works! :)

Hi Rogier,

I definitely will eventually, but for the moment I would advise anyone to just add this repository as a submodule. If you need a short (but good!) introduction to submodules, I think this gist explains it very well: https://gist.github.com/gitaarik/8735255.

Please let me know if this approach works for you for the time being.