Skip to content

IModalService - Inject vs CascadingParameter #527

Answered by chrissainty
Jimmys20 asked this question in Q&A
Discussion options

You must be logged in to vote

No, there isn't as long as you have the <CascadingBlazoredModal> component added. Under the hood, the CascadingParameter is the IModalService from DI. The reason we do this is to make sure the service and the <CascadingBlazoredModal> component have been setup correctly. If a developer forget to register the service with the DI container, or forgets the <CascadingBlazoredModal> component, there will be an error straight away.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jimmys20
Comment options

Answer selected by Jimmys20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #526 on July 13, 2023 08:57.