Cannot register custom plugin with Angular

I use Handsontable in Angular 6 project.

I made a custom external plugin (TreePlugin) based on the skeleton provided here. But when the plugin gets registered, the following error appears:
GlTableComponent.html:3 ERROR Error: Record translator was not registered for this object identity
at getTranslator (handsontable.js:25013)
at TreePlugin.BasePlugin (handsontable.js:2728)
at new TreePlugin (hot-tree.plugin.ts:12)

Do you have any idea what might go wrong? Or better you probably have a working example of external plugin under Angular?

Sorry, we do not have an example of a custom plugin in vanilla nor Angular. Maybe you can share a demo with your recent progress? I’ll ask developer to take a look at it.

Thank you @aleksandra_budnik for your response.

Look at the example here https://stackblitz.com/edit/angular-hot-plugin
There are two plugins: standard hiddenRows plugin and custom one. As you can see in the console only standard one gets instantiated.

Thank you for sharing the demo.

Our Angular developer is currently on a vacation (till next week) but I will ask another colleague to take a look at the example and be back with news.

I just got a hint of my colleague

This const customPlugin = hotInstance.getPlugin('externalPluginSkeleton'); retunsundefined, as this is not a plugin.

and he have send me a tutorial on how to attach a plugin handsontable-skeleton/plugins/external at master · handsontable/handsontable-skeleton · GitHub

Thanks for your support and quick feedback!

I was aware of the link you provided, but my goal was to find an Angular way of attaching plugins.
After some more investigation I eventually found the cause of the problem: while using Angular wrapper for handsontable-pro, I imported ‘hansontable’ (CE edition) when registering plugin. It seems that the plugin got registered within CE edition library, but the grid was instantiated then by PRO edition library. I fixed import in external-plugin.ts
import * as Handsontable from 'handsontable-pro';
instead of
import * as Handsontable from 'handsontable';
and it worked well.

Considering the fact that both ‘handsontable-pro’ and ‘handsontable’ libraries get installed when I set ‘handsontable-pro’ dependency, it would be good to mention somewhere in the documentation, that custom plugin should be registered with the same library that used to instantiate grids.

Thanks again and have a nice day.

Oh, so that was it. I am happy that you’ve found it and it works well.