Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Tag Helper initializers #2162

Closed
DamianEdwards opened this issue Mar 12, 2015 · 0 comments
Closed

Tag Helper initializers #2162

DamianEdwards opened this issue Mar 12, 2015 · 0 comments

Comments

@DamianEdwards
Copy link
Member

Enable any Action<ITagHelper, ViewContext> to be registered in DI to allow setting of tag helper properties after any [Activate] properties are set but before their bound from the source document and the tag helper is executed.

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.InitializeTagHelper<FormTagHelper>((helper, viewContext) =>
        {
            helper.AntiForgery = false;
        });
    }

    ...
@DamianEdwards DamianEdwards self-assigned this Mar 12, 2015
@DamianEdwards DamianEdwards added this to the 6.0.0-rc1 milestone Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 12, 2015
DamianEdwards added a commit that referenced this issue Mar 13, 2015
- Any Action<ITagHelper, ViewContext> can be registered in DI to allow setting of tag helper properties after any [Activate] properties are set but before their bound from the source document and the tag helper is executed
- Removed previous tag helper options as initializers is the way to do this now
- #1689
- #2162
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant