The `refreshTable()` function is in the parent component. I need to trigger it whenever I updated information in my modal and closes it.

I am using *@ng-bootstrap* for my modal

For may **parent.component.ts**

> 
> 
> ```
> import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
> 
>  constructor(
> private ngbModal: NgbModal,
> )
> 
> viewModal() {
>     const openModal = this.ngbModal.open(ModalComponent);
>     openModal .componentInstance.id = row.id;
> }
> 
> refreshTable() {
>     //refresh code block here
> }
> 
> ```
> 
> 

For my modal.component.ts

> 
> 
> ```
> import { NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
> 
> constructor(
> private activeModal: NgbActiveModal,
> )
> 
> updateParent() {
>     //update data to database code here
>     this.activeModal.close();
> }
> 
> ```
> 
> 

How to trigger `refreshTable()` from ModalComponent after closing the modal? Since there are changes in the data from database, data from parent is not updated accordingly when modal is closed.