As suggested in many other tutorials, I've decided to declutter my app.module from specific angular material modules and have created a separate module called 'material module' -- then I have imported this module directly into the app.module's imports array.
Now if I have a material button in app.component.html all is good and themeing is applied.
However, I have an Auth Module which is being displayed via the and any angular themeing does not get applied in that module, they're all basic html elements.
I'm sure I'm missing something really obvious about how modules are supposed to work in angular but after reading a lot of threads here and some forums via google search + documentation, I can't figure out what it is that I'm missing.
MaterialModule
into theAuthModule
then the material objects are outside of the context and angular doesnt know anything about them. Yes, this is an accepted way of sharing code. The .forRoot method is used for services, what you're discussing are the angular components (ng-button, etc...). See the angular docs on sharing modules here angular.io/guide/sharing-ngmodules - Darren Lamb