We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

unload/unsubscribe flexmonster

Answered
Manoj asked on December 5, 2022

Hi, 
I am using flexmonster in angular with npm package ng-flexmonster. and it's working fine but when I am navigating to other page/component(In which I am not using flexmonster) and doing something in form then getting error like as 
TypeError: Cannot read properties of undefined (reading 'toLowerCase') at l.naa (flexmonster.full.js:93:460)
While i am not using toLowerCase in that component.
So now please let me know how can i solve this.
Please find attached file.
 
 

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 5, 2022

Hello, Manoj!

Thank you for writing to us.

We recommend using the OnDestroy Angular lifecycle hook combined with Flexmonster's dispose() API call. This will delete the pivot table instance with the browser's garbage collector every time a component using Flexmonster is closed. See the example below:

ngOnDestroy(): void {
this.pivot.flexmonster.dispose();
}

Please let us know if this solution works for you.

Best Regards,
Maksym

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster December 14, 2022

Hello, Manoj!

Hope you are doing well.

Our team is wondering if you had some time to try the suggested approach and delete the pivot instance using the OnDestroy Angular hook combined with flexmonster.dispose() API call.
Could you please let us know if it works for your case?

Looking forward to hearing from you.

Regards,
Solomiia

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 21, 2022

Hi, Manoj!

We would like to know if the suggested approach helped you to solve the issue.
Our team would be glad to hear your feedback.

Kind Regards,
Maksym

Please login or Register to Submit Answer