Closed pablopioli closed 3 years ago
Thank you for reporting!
I could write the pull request if this solution is acceptable.
Thanks!
However, adding a new configuration option for this purpose will be very hard, I think.
Because the UseLOadingBar()
extension method runs before configured the DI container.
So, I came up with the idea that the query selector which specifies the injection point should be changed to <script[src]>
.
I will apply this idea and publish a new version of this package in a few days.
I rolled out the fixed version v.13.1.1 just now.
Please try it out. 🙂
I can confirm that version 13.1.1 resolves this problem.
Thanks!
I know this is an edge case, but when you have a Blazor app that doesn't run in the root of the site an error is thrown.
When you use a base path you can end with an script tag as
<script src="/app/_framework/blazor.webassembly.js"></script>
In this case the selector UseLoadingBar cannot find the script tag and the app fails at start.
As ScriptInjectorComponent is internal an option to configure this tag could be necessary in this cases. I could write the pull request if this solution is acceptable.
Thanks for this great component.