문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| angular:forms [2019/01/16 05:23] – [ngModel properties] 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 === | ||
| - | 적용되는 class는 {{ name.className }}로 확인 가능하다. | + | <code javascript> |
| + | <input type=" | ||
| + | </ | ||
| + | 해쉬(# | ||
| + | 적용되는 class는 | ||
| ^State ^Class if true ^Class if false^ | ^State ^Class if true ^Class if false^ | ||
| 줄 32: | 줄 36: | ||
| === ngModel properties === | === ngModel properties === | ||
| - | ^ Class ^ Property ^ | + | ^Class |
| - | |ng-untouched |untouched | | + | |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]=" | ||