Closed schuchuva closed 8 months ago
Maybe you need to declare the service in your .Client project too. If you are using hosted WASM or AutoMode ? I was using this cool compo in a .net 7 pure wasm and it was working, not tested with 8.0 but I will... the last release was one year back... so maybe it is not compatible with all the new render modes.
.Net8 Add to the Program.cs in your .Site.Client project should do it. builder.Services.AddBlazoredModal();
Then add the <CascadingBlazoredModal> wrapping the router </CascadingBlazoredModal>
and that should do it.
@digitalchrisg is correct. If you follow those instructions all should be good. 👍
Not working for Blazor 8 app in InteractiveWebAssembly mode. Created brand new Blazor project with global InteractiveWebAssembly mode, added Blazored.Modal logic according to docs and got runtime error: Unhandled exception rendering component: Cannot provide a value for property 'ModalService' on type 'Blazored.Modal.CascadingBlazoredModal'. There is no registered service of type 'Blazored.Modal.Services.IModalService'. System.InvalidOperationException: Cannot provide a value for property 'ModalService' on type 'Blazored.Modal.CascadingBlazoredModal'. There is no registered service of type 'Blazored.Modal.Services.IModalService'.