angular-datatables icon indicating copy to clipboard operation
angular-datatables copied to clipboard

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

Open awais2080 opened this issue 8 years ago • 2 comments

0 html section for datatable image

1 this is where i call function from component

image

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

image

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

image

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

image

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

image

error

image

awais2080 avatar Jun 08 '18 21:06 awais2080

i have tried This.dtTriggersReport.unsubscribed() when modal is closed but still there is this error

awais2080 avatar Jun 08 '18 21:06 awais2080

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

awais2080 avatar Jul 05 '18 08:07 awais2080