How to inject RazorComponentLibrary with DI?

Posted 2 years ago by ATerentjev
Edited 2 years ago

Dear Gurus!

I have some project with MapView from MapBox or Leaflet depending on the value of some parameter something like

@if (sw == "mapbox")

{

    <MapboxView  />

}

else

{

    <LeafletView  />

}

Is it possible to use (ImapView - interface)

<IMapView />

and define implementation through DI?

Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 0
An error has occurred. This application may no longer respond until reloaded. Reload 🗙