angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Multiple module directories inside src directory

Open charitharumapperuma opened this issue 10 years ago • 4 comments

Windows 10 angular-cli: 1.0.0-beta.10 node: 4.4.4 os: win32 x64

Repro steps- Add a sub directory inside src. E.g. if src/core is added directory structure should be,

NgProject
    src/
        app/
        core/

Run "ng g component ..\core\header" inside project directory (in this case "NgProject") And I get the error, Invalid path: "..\core\header" cannot be above the "src\app" directory

I think this happens because Angular CLI supports creating directories, services, etc. only inside src/app directory. Check this line of code, and hard-coded "app" at the end of the line.

I believe this is mostly a feature request, as it would be a good practice to separate core logic from application logic in large apps.

Also, moving "app" parameter to the configuration file seems appropriate.

charitharumapperuma avatar Aug 05 '16 09:08 charitharumapperuma

They told that they are in need of something similar. https://github.com/angular/angular-cli/issues/761

Vayrex avatar Aug 09 '16 16:08 Vayrex

Dupe of https://github.com/angular/angular-cli/issues/761. We aim to implement this in the future, but have no details to share now.

filipesilva avatar Aug 16 '16 04:08 filipesilva

It's not a good idea to generate feature module inside "app" folder ?! I need to generate a new module in "src" folder but instead it generated in "app" -_-

AbdallahBedir avatar Dec 07 '16 06:12 AbdallahBedir

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.