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

Any way to generate components etc. without being under the /app dir?

Open getabetterpic opened this issue 8 years ago • 2 comments

Versions

Angular CLI: 1.6.1
Node: 6.11.2
OS: darwin x64
Angular: 4.3.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, tsc-wrapped
... upgrade

@angular/cli: 1.6.1
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
typescript: 2.5.2
webpack-dev-server: 2.7.1
webpack: 3.5.6

Repro steps

  • ng g component components/test --app=ui

Observed behavior

  create app/javascript/ui/app/components/test/test.component.html (23 bytes)
  create app/javascript/ui/app/components/test/test.component.spec.ts (614 bytes)
  create app/javascript/ui/app/components/test/test.component.ts (236 bytes)
  update app/javascript/ui/ui.module.ts (721 bytes)

Desired behavior

Would like to be able to have the files generated under app/javascript/ui/components/test/test.component.ts without the app portion of the path.

Mention any other details that might be useful

We have two main applications that both consume this UI 'module' for lack of a better term. The UI module itself isn't a standalone application so it doesn't make sense to have its components/services/etc namespaced under an app folder. I'd be happy to put in a PR for a flag in the .angular-cli.json to handle this if that would be the best way to solve this.

getabetterpic avatar Jan 17 '18 00:01 getabetterpic

I think this is a duplicate of https://github.com/angular/angular-cli/issues/9370.

filipesilva avatar Oct 08 '19 16:10 filipesilva

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.