ngModule import module for entire app?

I'm upgrading my app to angular2 RC and I have a question about ngModule.

Lets say I use some componentsModule that has all kind of components that I want to use around my app.

Why would I need to import them in every module separately? Why cant I just tell the appModule - "hi make sure everyone gets this."

Wont requiring that module over and over again in each module that uses him is just a waste of resources ? Or is angular2 uses them as singletons ? and if so cant that be a problem ? - What If I do need new insentces


ANSWERS:


Modules are just a way for Angular's compiler to tell, which components it should expect when going through the templates.

Ideally, you want your AppModule to be clean and only import what it needs to bootstrap the page. Next, you import (or route to lazy-loaded modules) your feature modules, which make up your application.

In case you often have one component in many different templates, you can create a SharedModule, which will declare the most common components and pipes in your application, and import that shared module in your feature modules.

When Angular 2 compiles your feature module and finds a component from a shared module, it will know how to compile it since you imported that module.



 MORE:


 ? Angular 2 build error - '../@angular/platform-browser-dynamic' no exported member 'bootstrap'
 ? Angular 2 Login Module with template
 ? PHP Array, Dynamic Array Name or Other Technique
 ? PHP Array, Dynamic Array Name or Other Technique
 ? PHP Array, Dynamic Array Name or Other Technique
 ? Building a multidimensional array dynamically from another array with PHP?
 ? Counting rows/records in a multidimensional array
 ? Php dynamic array name
 ? Get select option value from forms using jquery created dynamically in loop
 ? Get select option value from forms using jquery created dynamically in loop