如何将其他列添加到NgForm

时间:2018-08-08 11:47:10

标签: angular2-forms angular4-forms angularjs-ng-form

这里我的表单中有一个文本框

<form #myForm="ngForm" novalidate>

      <mat-form-field class="full-width">
                  <input matInput placeholder="gLCode" name="gLCode" #gLCode="ngModel" ngModel required maxlength="12">
                </mat-form-field>
  <button type="submit"  class="btn btn-sm btn-primary save"   (click)="register(myForm)">
    Save</button>

我的Component.ts代码是

 register(myForm: NgForm) {
//Here how can i add additional column Like Current Date
}

在注册中,我成功绑定了我的数据,但是我想将DateTime添加到myform中,请帮助我如何添加

0 个答案:

没有答案