04-09-2024 04:26 AM
I have set up a data loader in my extension and configured it to load successfully from the aca app.
However, it is pretty useless as I cannot figure out how to inject a service into the data loader function.
My code follows the aca documentation https://alfresco-content-app.netlify.app/#/extending/custom-extension-loaders. This shows you well how to set up a loader but skips over how to add a service to the ExtensionLoaderCallback. The frustrating thing is that the example actually shows the callback using a service. However, because the callback is implemented as a constant function I cannot figure out how to inject or use a service within it as it has no constructor for DI.
I have tried this (note I inject a service using inject) but it fails when the loader runs as the loader guard does not recognise it as the expected function template and the service does not get loaded:
Explore our Alfresco products with the links below. Use labels to filter content by product module.