Angular 2: when to create a module instead of just component

时间:2016-08-31 18:38:24

标签: angular

The official doc says: "While the root module may be the only module in a small application, most apps have many more feature modules, each a cohesive block of code dedicated to an application domain, a workflow, or a closely related set of capabilities."

Consider the following example: facebook like application has navbar, lefthand nav, central screen which may be a facebook group or timeline, etc.

So, the root module will be an App itself, but what's about others? Should navbar be a module with it's own component or just a component?

Should facebook group element be a module + component or just a component?

I just can't get when I need another module...

Please share other examples and useful links.

0 个答案:

没有答案