import { Component, OnInit } from '@angular/core'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-script', templateUrl: './script.component.html', styleUrls: ['./script.component.scss'] }) export class ScriptComponent implements OnInit { validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } ngOnInit(): void { this.validateForm = this.fb.group({ script: [null, [Validators.required]], }); } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } }