What Is Injectors?
A service is just a class in Angular until you
register with an Angular dependency injector.
The injector is responsible for creating angular
service instances and injecting them into classes.
You rarely create an injector yourself and Angular
creates automatically during the bootstrap process.
Angular doesn't know automatically how you want
to create instances of your services or injector. You must configure it by
specifying providers for every service. Actually, providers tell the injector
how to create the service and without a provider not able to create the
service.
Bootstrap defines the components that should be bootstrapped
when this module is bootstrapped. The components listed here will automatically
be added to entryComponents.
Explore in detail by using below questions -
2. What
Are @Injectable providers?
I hope enjoy this post. Thank you very much
reading this post.