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

Consider Code-Generating helper code for invoking viewcomponents in razor #1435

Closed
rynowak opened this issue Oct 22, 2014 · 1 comment
Closed

Comments

@rynowak
Copy link
Member

rynowak commented Oct 22, 2014

Related to #612 - this suggestion goes further.

Use razor/roslyn to code generate a wrapper for a view component that will simplify invoking it from Razor, while keeping the authoring experience the same.

Sample code:

@inject ViewComponent<TagCloud> TagCloud

@await TagCloud.GetTags(count: 10)

The generated methods would have the same names and parameters as the methods defined on the viewcomponent class.

@danroth27 danroth27 added this to the 6.0.0-rc1 milestone Oct 24, 2014
@danroth27 danroth27 modified the milestones: Backlog, 6.0.0-rc1 Oct 30, 2014
@danroth27
Copy link
Member

We plan to address view component invocation by supporting invoking view components as tag helpers #1051.

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

2 participants