Reputation: 2453
Am having this issue, where when I generate components with Angular CLI instead of generating them in the same folder I have CD in it generate them in the App folder. Lets say I have CD to App/Recipe and I use this "ng g c recipe-item" it will be generated in App folder instead of Recipe.
Upvotes: 2
Views: 2457
Reputation: 130
if you want to generate a new component called recipe-item inside of the recipe directory:
ng g c recipe/recipe-item
See page 2: https://cli.angular.io/reference.pdf -> ng generate -> Valid types: -> component
Upvotes: 8
Reputation: 4359
as shown on angular-cli page
components support relative path generation
try using
ng g component recipe-item
Upvotes: 0