Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Material Module #3

Closed
bilel-noomene opened this issue Jul 13, 2017 · 4 comments
Closed

Importing Material Module #3

bilel-noomene opened this issue Jul 13, 2017 · 4 comments

Comments

@bilel-noomene
Copy link

I want to know why import the MateriaModule module both into CoreModule and into AppModule? Why not add it to the CoreBundle module exports and remove it from AppBundle?
Thanks

@Ismaestro
Copy link
Owner

Ismaestro commented Jul 17, 2017

Hello @bilel-noomene,
CoreModule only exports components from it's own module, and the main reason to use exports is to allow other modules to import what you are exporting (there is no reason to exports MaterialModule).
So, MaterialModule should be imported in every module that use angular material components. You have more info here.

@Ismaestro
Copy link
Owner

Ismaestro commented Jul 17, 2017

@bilel-noomene thinking about this, I've made a change to only import MaterialModule in one point (SharedModule), and export it in that module because every module should import SharedModule...
commit here

@bilel-noomene
Copy link
Author

bilel-noomene commented Jul 18, 2017

Thank you @Ismaestro.
In this case, will it be more consistent to place material.module.ts file under the shared folder?

@Ismaestro
Copy link
Owner

Ismaestro commented Jul 19, 2017

@bilel-noomene Of course, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants