The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

vkelman (54) [Avatar] Offline
In Angular 6 it now doesn't add provider to app.module, but instead generates product.service.ts with

  providedIn: 'root'

which, according to allows to load service lazily. It looks like "-m" option is ignored now.

What is not clear to me: now by looking at app.module we cannot determine which providers does it use. Isn't it making code much harder to understand?
Yakov Fain (219) [Avatar] Offline
I'm not sure if the provideIn property is that useful. It spares you from mentioning the services in the root module, but it's not clear what to do if you want to change the provider or if you want to declare a provider on the component level. For not, I don't use this provideIn property.