Angular Dependency Injection and Lazy Loaded Modules

preview_player
Показать описание
Let's explore the different ways of registering an Angular service with the dependency injection mechanism, in particular the peculiarities when it comes to lazy loaded Angular Modules.

Рекомендации по теме
Комментарии
Автор

This doesn't answer the question, of which lazy chunk ships the code for this service? I guess the service's code still ends up in the main chunk? Or does the DataServiceModule produce it's own lazy loaded module, which get's fetched as either Feature1 or Feature2 is being activated?

Kotfluegel
Автор

Great explanation! Although I would also like to hear your opinion on the pros and cons of example providedIn: DataAccessModule

hsemog