Description
OS?
Mac OSX Sierra
Versions.
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
Option 1
ng g m foo --no-component
This would generate the module without the component ts, css, spec, html
Option 2
ng g m foo
Or ideally the default would be to not generate a component at all. It can easily be created after by doing ng g c bar
.
Why?
-
It is easy to add a component when needed.
-
It is distracting to generate a module and have 4 extra files created when you do not want them.
-
Avoids having to delete 4 files with
rm bar.component.*
Details
use case ...
https://github.com/johnpapa/event-view/blob/master/src/app/core/core.module.ts
Notice this one … common use case for a module that contains mostly reusable services and only one component. And in this case, the component is not named the same as the module (and shouldnt be).
Option 2 above is my preference.