This repo shows a simple ModuleInjector tree in Angular.
To use:
- Clone this repo with
git clone https://github.com/kapunahelewong/module-injector-tree.git
cd
into the directorynpm install
ng serve
- Open a browser to
http://localhost:4200
- Open the code in your editor.
There are two services, the FlowerService and the AnimalService. The FlowerService is available via the root ModuleInjector so the AppModule and LazyModule can see it, but the AnimalService is visible only to the LazyModule. This demonstrates the ModuleInjector tree.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
This project was generated with Angular CLI version 8.0.1.