Skip to content

Feature Request/Question: Ability to easily author/inject new directives for Razor? #37302

@mkArtakMSFT

Description

@mkArtakMSFT

From @Fir3pho3nixx on March 24, 2018 18:58

Currently, I cannot find an easy way to author/inject custom directives into Razor whilst using ASPNET Core Mvc(Kestrel).

I can see that the @Inject directive gets registered within razor here. Now if I wanted to inject a custom directive to MVC on startup how would I achieve that easily? Imagining for a second I wanted to create a '@FooInjector'.

I can see you offer access to RazorViewEngineOptions is this potentially where you guys would expose something like this?

Copied from original issue: aspnet/Mvc#7540

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions