sending data from a component to modal component service for dynamic columns to draw a report firstly its drawn right but when i again draw from first component it gives error
0 html section for datatable

1 this is where i call function from component

2 this is service of modal component service where i m setting columns and headers dynamically

3 this is where i m calling trigger to make data table

4 firstly it will make right report but when i close model component (its not destroyed) and then again make report it gives me this error

5 second time with no data table option but with error in console

error

i have tried This.dtTriggersReport.unsubscribed() when modal is closed but still there is this error
bro this problem is resolved there are two possible things you can do to this if you are using model or other component make sure it is destroyed and do you this.dtTrigger.unsubscribed() in ngDestroy problem will be resolved second make two seperate Modules rathar than on implementing in modal as modals are not being destroyed so this.dtTrigger.unsubscribed is not being called if you forcefully call it that will also not be solved i have done it with dynamic columns and data accordingly