문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| angular:forms [2019/01/16 05:15] – [Track Control State and validity] taekgu | angular:forms [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 24: | 줄 24: | ||
| * Suitable for simple scenarios | * Suitable for simple scenarios | ||
| === Track Control State and validity === | === Track Control State and validity === | ||
| + | <code javascript> | ||
| + | <input type=" | ||
| + | </ | ||
| + | 해쉬(# | ||
| + | 적용되는 class는 < | ||
| + | |||
| ^State ^Class if true ^Class if false^ | ^State ^Class if true ^Class if false^ | ||
| - | |The control has been visited.|ng-touched|ng-untouched | + | |The control has been visited.|ng-touched|ng-untouched| |
| - | |The control' | + | |The control' |
| - | |The control' | + | |The control' |
| + | === ngModel properties === | ||
| + | ^Class | ||
| + | |ng-untouched | ||
| + | |ng-touched | ||
| + | |ng-pristine | ||
| + | |ng-dirty | ||
| + | |ng-valid | ||
| + | |ng-invalid | ||
| + | <code javascript> | ||
| + | <div class=" | ||
| + | < | ||
| + | <input type=" | ||
| + | </ | ||
| + | {{ name.className }} | ||
| + | {{ name.touched }} | ||
| + | </ | ||
| + | # | ||
| + | === class property적용 === | ||
| + | <code javascript> | ||
| + | <input type=" | ||
| + | </ | ||
| + | **[class.is-invalid]=" | ||