diff --git a/src/app/app.component.css b/src/app/app.component.css index ba43f51..d8d35ce 100644 --- a/src/app/app.component.css +++ b/src/app/app.component.css @@ -1,3 +1,28 @@ p { font-family: Lato; } + +form { + padding-left: 20px; +} + +div { + margin-top: 20px; + margin-bottom: 10px; +} + +form.ng-untouched { + border: solid 1px blue; +} + +form.ng-touched { + border: solid 1px red; +} + +input.ng-untouched { + border: solid 2px blueviolet; +} + +input.ng-touched { + border: solid 2px coral; +} diff --git a/src/app/app.component.html b/src/app/app.component.html index 1939b9c..555d709 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,7 +1,20 @@
- -
姓名:
-
email:
-
+
帳號:
+
+ 密碼: +
+
+ + +
-
 {{form.value| json }}
+ +
+

帳號狀態

+
是否曾經點選過:{{id.touched |json}}
+
是否曾經點選過:{{id.untouched |json}}
+ +
+

表單狀態

+
是否曾經點選過:{{form.touched |json}}
+
是否曾經點選過:{{form.untouched |json}}