//html // ts openModal(id?: string): void { const isEditMode = !!id; const modal = this.modalSrv.create({ nzTitle: isEditMode ? 'Function Edit' : 'Function Add', nzContent: FormComponent, nzMaskClosable: false, nzData: id }); // Xử lý sự kiện afterClose để nhận dữ liệu từ modal khi nó đóng modal.afterClose.subscribe(result => { if (result || result?.succeeded) { this.getDataList(); } }); }