Skip to content

Constructor dependency injection for blazor partial classes #18483

@msschl

Description

@msschl

It would be nice to have constructor based dependency injection for blazor partial classes.

E.g.

namespace Blazor.Pages
{
    public partial class Index
    {
        private readonly string testMessage;

        public Index(IServiceA service)
        {
            this.testMessage = service.GetMessage();
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions