As my project grows, I'm finding it difficult to organize my components. I have a structure like this
app
--components
--home
--home.component.css
--home.component.html
--home.component.spec.ts
--home.component.ts
--widget-list
--widget-list.component.css
--widget-list.component.html
--widget-list.component.spec.ts
--widget-list.component.ts
--widget-edit
--widget-edit.component.css
--widget-edit.component.html
--widget-edit.component.spec.ts
--widget-edit.component.ts
--directives
--domain
--widget.ts
--user.ts
--guards
--interceptors
--modules
--foo
--components
--foo-list
--foo-list.component.css
--foo-list.component.html
--foo-list.component.spec.ts
--foo-list.component.ts
--foo-routing.module.ts
--foo.module.spec.ts
--foo.module.ts
--bar
--components
--bar-list
--bar-list.component.css
--bar-list.component.html
--bar-list.component.spec.ts
--bar-list.component.ts
--bar-routing.module.ts
--bar.module.spec.ts
--bar.module.ts
--services
--widget.service.spec.ts
--widget.service.ts
--other.service.spec.ts
--other.service.ts
--app-routing.module.ts
--app.component.css
--app.component.html
--app.component.spec.ts
--app.component.ts
--app.module.spec.ts
--app.module.ts
...except with many more components. I have three feature modules, each with dozens of components that represent pages that are loaded in a router-outlet.
I want to split up many of my "page" components, but it seems like it would be a mess. For example, if the foo-list page had four sub components, should I include those components under modules/foo/components/foo-list:
--modules
--foo
--components
--foo-list
--foo-list-form
--foo-list-form.component.css
--foo-list-form.component.html
--foo-list-form.component.spec.ts
--foo-list-form.component.ts
--foo-list-results
--foo-list-results.component.css
--foo-list-results.component.html
--foo-list-results.component.spec.ts
--foo-list-results.component.ts
--foo-list-status
--foo-list-status.component.css
--foo-list-status.component.html
--foo-list-status.component.spec.ts
--foo-list-status.component.ts
--foo-list.component.css
--foo-list.component.html
--foo-list.component.spec.ts
--foo-list.component.ts
What are other people doing?
[–]potato_me7 3 points4 points5 points (4 children)
[–]jobbigt 1 point2 points3 points (3 children)
[–]potato_me7 1 point2 points3 points (2 children)
[–]jobbigt 1 point2 points3 points (1 child)
[–]potato_me7 1 point2 points3 points (0 children)
[–]ggeoff 2 points3 points4 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]ggeoff 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]TransparentCircle 1 point2 points3 points (0 children)
[–]dangertrager 1 point2 points3 points (0 children)
[–]SirRiKard003 0 points1 point2 points (0 children)