我想提交我的表单并有一种方法可以用我新创建的用户更新我的表。
我从今天早上就卡住了。
我已经有一个删除方法但错过了创建方法
这是我的 html
<div class="manage-content">
<div class="title">
<mat-icon class="user-icon">how_to_reg</mat-icon>
<h3>Create a user</h3>
</div>
<form [formGroup]="form" (ngSubmit)="onSubmit()">
Value : {{form.value | json}}
<div class="form">
<div class="leftSide">
<mat-form-field class="full-width-input" appearance="outline">
<input id="firstName" matInput placeholder="First name" formControlName="f_name" #f_name>
<mat-error *ngIf="isFieldInvalid('f_name')">
The first name you've entered is malformed.
</mat-error>
</mat-form-field>
<mat-form-field class="full-width-input" appearance="outline">
<input id="middleName" matInput placeholder="Middle name" formControlName="m_name" #m_name>
<mat-error *ngIf="isFieldInvalid('m_name')">
The middle name you've entered is malformed.
</mat-error>
</mat-form-field>
<mat-form-field class="full-width-input" appearance="outline">
<input id="lastName" matInput placeholder="Last name" formControlName="l_name" #l_name>
<mat-error *ngIf="isFieldInvalid('l_name')">
The last name you've entered is malformed.
</mat-error>
</mat-form-field>
<mat-form-field class="full-width-input" appearance="outline">
<input id="email" matInput placeholder="Email" formControlName="email" #email>
<mat-error *ngIf="isFieldInvalid('email')">
The email you've entered is malformed.
</mat-error>
非常感谢你的帮助
相关分类