Aspnetcore: [Blazor] Loading sub/child blazor wasm app/apps inside main/parent app

Created on 12 May 2020  路  6Comments  路  Source: dotnet/aspnetcore

If we want to have several blazor wasm apps inside one umbrella how can it be done? Is it theoretically possible?

Now if we want to load another app it should be hosted separately and linked from our app and loaded from scratch when called.

In scenario when design is complex and contains several apps (functional blocks) it will be great if we can load blazor app inside currently loaded app.

Everything can not be turned as component and pushed to main app, it makes payload bigger and solution like monster.

Let's say we have some sub app which can be called by some user or not, so it should load on demand inside parent app without visual notice that another app was called.

Hope I explained well, for large LOB apps this feature will be nice to have.

@SteveSandersonMS @danroth27

Duplicate Resolved area-blazor

All 6 comments

@Lupusa87 thanks for contacting us.

I'm not sure I understand, do you want "a blazor app" within a "blazor app"? That's not possible.

If you are looking for multiple blazor apps rendered as part of an MVC/Razor pages app, that is.

In the case of Blazor WebAssembly apps they all need to be under the same host, since there is only one runtime.

This sounds like a duplicate of #5465

@javiercn Thank you.

I confirm that it was about blazor app whitin blazor app.

I have seen some conversation about this in stackoverflow and there were some suggestions.

@SteveSandersonMS I am not sure if lazy loading is same because I do not know good lazy loading concept, hope it will help here.

Maybe it is not possible now but we will need some flexibility in this area in future.

Loading sub apps or switching apps whithin main app.

I guess it needs some another design solutions than only lazy loading.

As we have now referenced component libraries in solution same way to have referenced sub blazor apps and load them whithin main app or instead main app.

Will not complicate more for now, we can return to this after RTM.

Thanks
Best regards.

@Lupusa87 thanks for the details.

If you just want multiple apps hosted within an ASP.NET Core app, that's possible today. See here for a sample.

WRT to loading an app within an already loaded app, that's not something we support today, the closest thing would be something that uses lazy loading as a way to load a specific set of components and render them yourself, but there is no magic way of rendering an app within an app.

@javiercn Thank you Javier, appreciate your time and attention.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbanks54 picture rbanks54  路  3Comments

TanvirArjel picture TanvirArjel  路  3Comments

ipinak picture ipinak  路  3Comments

guardrex picture guardrex  路  3Comments

FourLeafClover picture FourLeafClover  路  3Comments