2019-07-12
Can one generate an app to sub-directories with “ng generate application”?
stackoverflow
Question

I'm trying to set up an Angular Workspace and would like to know if it's possible to run the "ng generate application" command to a sub-directory within the projects folder.

I've already tried running it like the "ng generate component" command where you just specify the path like "ng generate component main/sub", but it doesn't seem like "application" has that option.

Answer
1

You should use create the worspace like this:

ng new worspace-name --create-application=false

go to folder:

cd workspace-name

then create the application(s) like this:

ng generate application application-name

check https://angular.io/cli/new and https://angular.io/cli/generate

Can one generate an app to sub-directories with “ng generate application”?
See more ...