I would like to be able to send the name of a Blazor component to another component and have it render. Something like:
@page "/"
@using MyProject.Shared.Navigation
<ContentLeftNav UseNav="Navigation1">
Content
</ContentLeftNav>
Where Navigation1.razor is a component rendered in a certain place within the ContentLeftNav.razor component. I've seen articles where switch
is recommended to alternate between components, but I'd like to avoid writing out a switch
statement for all possible navigation components. Is what I'm wanting to do even possible?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…