Aspnetcore: Custom index.html for Blazor

Created on 14 Jun 2018  路  5Comments  路  Source: dotnet/aspnetcore

Is there any way to use a custom "index.html"? If not, is it on the road-map?

Because I think it would be great because adding a custom index.html for your project could open the possibility to:

  • Target a DOM element for Blazor code, like Angular, React... So part of the page could be static HTML and some DIV would be replaced with the rendered application. (I think it require some change in Blazor to accept the Id of the element)
  • Customizable "Loading page", instead of the currently used simple "Loading..." message. (It should work out of the box).
area-blazor

Most helpful comment

@majorimi The index.html file is in the wwwroot directory and you can edit it freely to add your own customisations.

All 5 comments

If you want to replace "loading..." with something, you can put whatever html you want inside the tag. Am I missing something?

@majorimi The index.html file is in the wwwroot directory and you can edit it freely to add your own customisations.

Sorry guys my fault... I'm totally new to Blazor, just started using ASP.NET Core and the whole wwwroot folder concept is kind of new to me. I noticed the "index.html" in "binDebugnetstandard2.0dist" folder new the the "_framework" folder with all the runtime stuff and thought it was generated by the compiler. But I was wrong.
Replaced the loading text with an image. Works perfectly....

Thanks.

No problem @majorimi! It takes a while for anyone to get familiar with a new technology.

For someone who used MVC/Razor before it is very easy to get use to it.
Even the promise to get rid of the JavaScript (or at least hide it from the developer) sound awesome! This is the biggest thing since .NET Framework was introduced!! I hope the Blazor will be production ready soon.

Thanks and keep up the good work guys 馃憤

Was this page helpful?
0 / 5 - 0 ratings