<form nz-form nc-adaptive-form [formGroup]="_applicationForm" nz-row [nzGutter]="24">

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label nzRequired>应用名称</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <input nz-input formControlName="name" placeholder="请输入应用名称">
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label nzRequired>应用代码</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <input nz-input formControlName="code" placeholder="请输入应用代码">
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label>描述</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <textarea nz-input formControlName="description" placeholder="请输入描述"></textarea>
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label>图标</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <input nz-input formControlName="icon" placeholder="请输入图标">
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label>分组名称</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <input nz-input formControlName="groupName" placeholder="请输入分组名称">
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label>公共应用</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <nz-switch formControlName="common" nzCheckedChildren="公共" nzUnCheckedChildren="私有"></nz-switch>
      </nz-form-control>
    </nz-form-item>
  </div>

  <div nz-col [nzSpan]="24">
    <nz-form-item>
      <nz-form-label>顺序号</nz-form-label>
      <nz-form-control [nzErrorTip]="controlErrorTemplate">
        <nz-input-number formControlName="sequence" nzPlaceHolder="请输入顺序号"></nz-input-number>
      </nz-form-control>
    </nz-form-item>
  </div>

</form>

<ng-template #controlErrorTemplate let-control>
  <div *ngFor="let error of control.errors | keyvalue">{{ error.value }}</div>
</ng-template>
