I have read many articles about Angular folder structure. It is still not clear to me where do we put component services. Shared services between components are put under shared. But what about a service that is used only by a component? Usually I put all my component logic into a service and leave the component with code relevant only to UI stuff. Which one is better to use:
Each component and its service into the same folder
.
├── app.component.html
├── app.component.ts
├── app.module.ts
├── app-routing.module.ts
└── shop
├── clients
│ ├── clients.component.html
│ ├── clients.component.ts
│ ├── clients.component.css
│ └── clients.service.ts
├── orders
│ ├── orders.component.html
│ ├── orders.component.ts
│ ├── orders.component.css
│ └── orders.service.ts
├── shop.module.ts
└── shop-routing.module.ts
or all services of a module under a services folder
.
├── app.component.html
├── app.component.ts
├── app.module.ts
├── app-routing.module.ts
└── shop
├── clients
│ ├── clients.component.html
│ ├── clients.component.ts
│ └── clients.component.css
├── orders
│ ├── orders.component.html
│ ├── orders.component.ts
│ └── orders.component.css
├── services
│ ├── clients.service.ts
│ └── orders.service.ts
├── shop.module.ts
└── shop-routing.module.ts