-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TagHelpers #44
Comments
The tag helper documentation lives on the ASP.NET doc site. |
I think this refers to the Getting Started with ASP.NET 5 article we have. I'm personally not a fan of tag helpers, which is probably why they aren't used in the tutorial... but I agree being consistent with the template is a good idea. |
Should consult with @DamianEdwards on the best practices here. |
http://docs.asp.net/projects/mvc/en/latest/views/tag-helpers/authoring.html |
I have no problem adjusting the article to use tag helpers, that is definitely the right thing to do from a consistency point of view. I'm about to update everything to Beta 8 so I will do that at the same time. Regarding liking tag helpers... for me personally it makes it too hard to distinguish between code and html. The thing I love about razor is that it's really clear what is code and it's just the same C# I write everywhere else in my application. With tag helpers that is completely obscured away. |
Read my intro doc - if you're using the default or light theme, TH/C# code is in a bold purple font. If you’re using the “Dark” theme the font is bold teal. I won't repeat the other advantages here, but I'm confident after using TH you'll grow to love them. |
GitHub doesn't know about them so I lose all that context when I'm looking at diffs, PR's etc. That's not my main issue though, if I look at this piece of markup... I have no idea what it's doing. If it was just calling APIs though I could go look at them, read Intellisense, etc.
BTW I'm not saying they don't provide value and that there aren't a bunch of folks who will like them... I'm just not one of them. I just want C# code and no magic/abstractions. |
@Rick-Anderson quick question, how do use the Here is the code, see where I'm trying to replace
|
@NTaylorMullen @rynowak can you answer @rowanmiller question? |
@rowanmiller You can do: |
@NTaylorMullen should that go in authoring TH or advanced? |
You put an |
@Rick-Anderson Not authoring, it's more of a usage behavior for |
We should not recommend
|
Yeah the It's also super weird because anywhere else I've swapped over to tag helpers everywhere else in #45. I'll leave this section as-is for the moment. |
@rowanmiller As soon as you type |
This is done in 3eba324, aside from the for loop scenario being discussed here (where it sounds like tag helpers are not the right thing to use). |
It would be a big help to introduce TagHelpers here and use them instead of HTML Helpers. This walkthrough doesn't prepare me to understand the Web Application template, which uses TagHelpers exclusively.
The text was updated successfully, but these errors were encountered: