|
|
@ -1,16 +1,7 @@ |
|
|
|
<form #form="ngForm" (submit)="onSubmit(form)"> |
|
|
|
<div> |
|
|
|
帳號:<input type="text" name="id" ngModel/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
密碼:<input type="password" name="password" ngModel/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
something:<input type="text" name ="abc" ngModel/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<button type="reset">重設</button> |
|
|
|
<button type="submit">登入</button> |
|
|
|
</div> |
|
|
|
<form #form="ngForm"> |
|
|
|
<ng-container #user="ngModelGroup" ngModelGroup="user"> |
|
|
|
<div> 姓名: <input type="text" name="name" ngModel /></div> |
|
|
|
<div> email:<input type="text" name="email" ngModel /></div> |
|
|
|
</ng-container> |
|
|
|
</form> |
|
|
|
<pre> {{form.value| json }}</pre> |