-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Tag Helpers: Modify TagHelper creation to activate ViewContext properties instead of inheriting from an interface. #1258
Comments
go for it |
- The TagHelperActivator enables dependency injection via properties and allows access to the ViewContext. - This replaces the ICanHasViewContext mechanism that we had in place before. - Added tests and fixed up existing to work with new format for providing ViewContext. #1258
@NTaylorMullen and @yishaigalatzer could you please clarify this issue?
separately tag helpers are already instantiated using |
- The TagHelperActivator enables dependency injection via properties and allows access to the ViewContext. - This replaces the ICanHasViewContext mechanism that we had in place before. - Added tests and fixed up existing to work with new format for providing ViewContext. #1258
- The TagHelperActivator enables dependency injection via properties and allows access to the ViewContext. - This replaces the ICanHasViewContext mechanism that we had in place before. - Added tests and fixed up existing to work with new format for providing ViewContext. #1258
- The TagHelperActivator enables dependency injection via properties and allows access to the ViewContext. - This replaces the ICanHasViewContext mechanism that we had in place before. - Added tests and fixed up existing to work with new format for providing ViewContext. #1258
Right now
TagHelper
s can retrieve theRazorPage
'sViewContext
by implementingICanHasViewContext
, after talks with @yishaigalatzer we've decided that we don't want this interface to be publicly facing and that we can provide theViewContext
to theTagHelper
in a better format.New way:
Note: Once aspnet/Razor/issues/182 is implemented we can decide if we want to make
[Activate]
take on the same behavior or if we want to make users be explicit on the[NotBound]
attribute.The text was updated successfully, but these errors were encountered: