I have project that makes use of material2 ("@angular/material": "^2.0.0-beta.6")
Which according to the docs here states that the MaterialModule is being removed and the forRoot() has already been squashed. I know the thought process behind breaking the module apart to ensure proper tree shaking, but why remove forRoot in the subModules too?
Consider this use case
Two modules depend on same material sub module like OverlayModule. NOTE: This material module has its own providers.
- Module one is lazy loaded.
- Module two is eagerly loaded.
How should I structure my new AppSpecificMaterialModule so that I can also provide all of material's providers and prevent duplication of provider Singletons? Do I have to take note of the material specific providers my app would ultimately consume and provide then myself at the appModule level? Kind of like what is described here?