Share ViewModel with Maui and BlazorWebView #1530
Unanswered
johngsandiford
asked this question in
Q&A
Replies: 2 comments
-
I got the same problem. For pages with ViewModels registered as singletons, you could inject it into the Blazor component. Does anyone have a solution for transients? |
Beta Was this translation helpful? Give feedback.
0 replies
-
you can pass an existing ViewModel to the BlazorWebView. It can be retrieved via a CascadingParameter more info: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I have a MAUI app that mixes MAUI controls and BlazorWebViews. I want to be able to share a view-model (i.e. the same instance) between both the MAUI part and the Blazor part, but I can't figure out how to share it.
Some view-models are one per SPA, but others are created dynamically.
Any help much appreciated. Thanks, John
Beta Was this translation helpful? Give feedback.
All reactions