I am looking to build an Angular2 application that can be run in 2 different ways - either within Electron or via the CLI.
Basically the underlying components of the application is a set of services. In the Electron version of the application these services will be exposed via a set of interactive components, however, for the CLI version they will be accessible using node.
At the moment, I am in the research/PoC phase - trying to confirm that this is possible and 2 questions have arisen:
- Does Angular support any other platforms? It seems that the bootstrap method is only applicable for the browser.
- It seems that Angular2 does not support injecting services within services unless they are both defined at the component/application level (i.e. a service does not have an injector). I am not keen to add all my dependencies for all of my services at the application level - in fact this won't work as I need non singletons. Has anyone developed a workaround for this?
Perhaps Angular2 isn't a good fit for this.