docs: attributes for 'label' and 'input' elements were mixed up (#41827)

A label should be 'for' an input, and an 'input' should have an 'id'.

PR Close #41827
This commit is contained in:
Hugo Mejia 2021-04-26 21:26:05 -07:00 committed by Misko Hevery
parent dac78d1ba1
commit b3cd1280da
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@
<!-- #docregion add -->
<div>
<label id="new-hero">Hero name: </label>
<input for="new-hero" #heroName />
<label for="new-hero">Hero name: </label>
<input id="new-hero" #heroName />
<!-- (click) passes input value to add() and then clears the input -->
<button class="add-button" (click)="add(heroName.value); heroName.value=''">