File

libs/nx/src/executors/shared/metadata-utils/__test/example-library/src/other/get-form-nested-form-group-typed.ts

Index

Properties

Properties

aFormControl
Type string
import { FormGroupTyped } from '@allianz/taly-common';
import { AbstractBuildingBlock } from '@allianz/taly-core';
import { FormControl, FormGroup } from '@angular/forms';

interface MyCustomForm {
  aFormControl: string;
}

export class GetFormIncorrectNestedFormGroupTyped extends AbstractBuildingBlock {
  formGroup = this.buildFormGroup();

  override getForm() {
    return this.formGroup;
  }

  private buildFormGroup() {
    return new FormGroup({
      aFormGroupTyped: this.createExpertPropertyFormGroup(),
      aPlainOldFormControl: new FormControl('')
    });
  }

  createExpertPropertyFormGroup() {
    const form = new FormGroup({
      aFormControl: new FormControl(`test`)
    });

    return form as FormGroupTyped<MyCustomForm>;
  }
}

results matching ""

    No results matching ""