Closed grofit closed 1 year ago
This is due to Photino.Blazor.PhotinoBlazorApp.Run()
explicitly calling WindowManager.Navigate("/");
which ends up loading the index.html.
It would be nice if PhotinoBlazorApp.Run()
optionally took in a path to an html file, which would also be useful for multi-window apps where different windows have different responsibilities and need to render something entirely different.
I made a quick PR to address this: https://github.com/tryphotino/photino.Blazor/pull/87
The fix to honor the Load() method has just been incorporated into https://github.com/tryphotino/photino.Blazor/pull/89
I am struggling to work out what the problem here is but due to a few factors I do not have my index page in
wwwroot
it is actually inwwwroot/_content/MyApp/index.html
, this is mainly down to trying to get dependent dlls containing static content to output correctly as mentioned in #20, so the fix for that means my app now inputs into a folder within thewwwroot
rather than in the root.ANYWAY with that out of the way I have the following in my setup:
I can see in the loading logs its doing:
So its finding the file correctly and if I browse to
file:///E:/Code/open-source/myapp/dist/wwwroot/_content/MyApp/index.html
in my browser the page is resolved but it blows us due to sandboxing onfile://
etc.The odd thing is if I drop an
index.html
into thewwwroot
folder it uses that, so its like it ignores the provided path and just uses whateverindex.html
it can find in there, even if I give it a completely bogus url it says its loading it, but just loads theindex.html
that ive manually put in there.So am I missing something here as I assumed the
Load
call was to tell it which page should be loaded, and in debug it works fine its just when I go todotnet publish
the app it seems to act differently, but I have no idea why.