IModalService - Inject vs CascadingParameter #527
-
Hello, I just noticed that in my code I've been getting an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, there isn't as long as you have the |
Beta Was this translation helpful? Give feedback.
No, there isn't as long as you have the
<CascadingBlazoredModal>
component added. Under the hood, theCascadingParameter
is theIModalService
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.