Skip to content

"ng generate module/component" doesn't work as expected #5127

@bboehm86

Description

@bboehm86

Please provide us with the following information:

OS?

  • Windows 10

Versions.

@angular/cli: 1.0.0-rc.0                      
node: 7.5.0                                   
os: win32 x64                                 
@angular/animations: 4.0.0-rc.1               
@angular/common: 4.0.0-rc.1                   
@angular/compiler: 4.0.0-rc.1                 
@angular/core: 4.0.0-rc.1                     
@angular/forms: 4.0.0-rc.1                    
@angular/http: 4.0.0-rc.1                     
@angular/platform-browser: 4.0.0-rc.1         
@angular/platform-browser-dynamic: 4.0.0-rc.1 
@angular/platform-server: 4.0.0-rc.1          
@angular/router: 4.0.0-rc.1                   
@angular/cli: 1.0.0-rc.0                      
@angular/compiler-cli: 4.0.0-rc.1             

Repro steps.

  1. run ng g m my-module - [ will work as expected ]

  2. decide that you want a module and routes, so run ng g m my-module --routing

  3. get asked if you want to override the old module, hit y

  4. get sad because the routing file was not created 😢

  5. decide that you want to add a component matching the module name, so run ng g c my-module

  6. get sad again because the new component got not added to your new my-module.module.ts but to your app.module.ts 😢

  7. be happy again because the Angular CLI is such a timesaver for most parts 😄👍

The log given by the failure.


Mention any other details that might be useful.

Thanks to the team for all the effort ❤️


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions