-
Ordinarliy, a Modal dialog appears when I call Should I expect a Modal dialog to appear when I call I couldn't imagine why it wouldn't--after all, the runtime is injecting the same IModalService into both, right? public class Class1 : IClass1
{
public Class1(IModalService modal)
{
Modal = modal ?? throw new ArgumentNullException(nameof(modal));
}
protected IModalService Modal { get; set; }
public void Show()
{
Modal.Show<MyDialog>();
}
} Then, from the component:
CC @chrissainty |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Ah, When I use "AddScoped" or "AddTransient" in my new class, it works. But a registering the class as a Singleton causes the trouble. Any idea why? |
Beta Was this translation helpful? Give feedback.
Ah, When I use "AddScoped" or "AddTransient" in my new class, it works. But a registering the class as a Singleton causes the trouble. Any idea why?