My scenario is as follows:
- I have built an Angular library that exposes a service, whose dependencies are passed in the constructor
- I have a separate AWS Lambda function (triggers on cron) that would need to use this service.
My question is: is there a way to bundle the library so that the service can be easily instantiated in the non-angular app, and avoid having to construct the dependency graph manually?
Ideally, from the lambda function I would just call something like
const service = MyAngularService.instance();
service.doStuff();
Is it at all possible?
Similar to: Using Angular Library in Non-Angular App
Copyright Notice:Content Author:「Sébastien Tromp」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58303559/integrate-an-angular-library-into-a-non-angular-app