0

I'm probably bad at google for not finding this but here it goes.

When generating a component with ng generate where does the src/app path prefix come from and how can I change it?

I'm talking about src/app in the following image.

enter image description here

gyozo kudor
  • 6,284
  • 10
  • 53
  • 80

3 Answers3

2

You can find it in your angular.json file, the property is sourceRoot eg:

"sourceRoot": "projects/myproject/src",
lovis91
  • 1,988
  • 2
  • 14
  • 24
2

You can find it inside angular.json file. For better understanding please follow official Angular guide

https://angular.io/guide/workspace-config

enter image description here

Bozhinovski
  • 2,496
  • 3
  • 20
  • 38
0

you should go to path you want to create the component

ex

cd desired-path

ng g c desired-component-name

Talha Akca
  • 394
  • 2
  • 8