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

Automatically convert ViewComponents to tag helpers #1051

Closed
NTaylorMullen opened this issue Aug 21, 2014 · 5 comments
Closed

Automatically convert ViewComponents to tag helpers #1051

NTaylorMullen opened this issue Aug 21, 2014 · 5 comments

Comments

@NTaylorMullen
Copy link
Contributor

Right now we can invoke/render ViewComponents via @Component.Invoke("MyViewComponentName", p1, p2....). We should consider making a "tag helper" alternative to rendering view components where you could do something like:

<myViewComponentName />

This would involve automagically converting ViewComponent's into TagHelperDescriptor's. As for how they'd appear in html it's up for discussion.

@NTaylorMullen NTaylorMullen added this to the 6.0.0-beta1 milestone Aug 21, 2014
@danroth27 danroth27 modified the milestones: 6.0.0-rc1, 6.0.0-beta1 Sep 4, 2014
@DamianEdwards DamianEdwards modified the milestones: Backlog, 6.0.0-rc1 Dec 11, 2014
@NTaylorMullen NTaylorMullen changed the title Tag Helpers: Automatically convert ViewComponents to tag helpers Automatically convert ViewComponents to tag helpers Jan 23, 2015
@hakenr
Copy link

hakenr commented Feb 9, 2016

My $100 for this feature. ;-)
<my-view-component-name foo="param value" bar="another value" />

@Eilon Eilon modified the milestones: 1.1.0, Backlog Jul 5, 2016
@Eilon Eilon added the 1 - Ready label Jul 5, 2016
cjqian pushed a commit to aspnet/Razor that referenced this issue Aug 24, 2016
Added view component tag helper updates.

aspnet/Mvc#1051
cjqian pushed a commit to cjqian/Razor that referenced this issue Aug 25, 2016
cjqian pushed a commit to aspnet/Razor that referenced this issue Aug 25, 2016
cjqian pushed a commit to cjqian/Mvc that referenced this issue Aug 25, 2016
@tuespetre
Copy link
Contributor

@NTaylorMullen: regarding what I meant about 'descendant tags'... I meant what if you nested view component tag helpers within each other, but it looks like that may be sorted out already by the use of self-closing tags.

@NTaylorMullen
Copy link
Contributor Author

@tuespetre the default implementation of ViewComponentTagHelpers for its v1 representation will override its body content. Of course there's opportunity to expand on this later if it seems valuable.

tuespetre pushed a commit to tuespetre/Mvc that referenced this issue Sep 8, 2016
This addresses aspnet#1051. There is one more pull request that needs to be completed/merged (for `CompositeTagHelperDescriptorResolver` and friends). After that, runtime should work!
cjqian pushed a commit that referenced this issue Sep 8, 2016
This addresses #1051. There is one more pull request that needs to be completed/merged (for `CompositeTagHelperDescriptorResolver` and friends). After that, runtime should work!
@ajaybhargavb ajaybhargavb assigned ajaybhargavb and unassigned cjqian Sep 15, 2016
@ajaybhargavb
Copy link
Contributor

0cfd536

@ajaybhargavb
Copy link
Contributor

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

9 participants