johnpapa / angular-styleguide

Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
http://johnpapa.net
MIT License
23.91k stars 4.16k forks source link

Angular with TypeScript Where to Store Interfaces used for Type Checking, as well as Smart versus Dumb Components #825

Open mtpultz opened 7 years ago

mtpultz commented 7 years ago

In Angular type checking is possible using interfaces (or as the styleguides suggests classes), but what does the folder hierarchy look like with regards to where interfaces should reside.

I've got a CoreModule, SharedModule, Features, etc all structured using the guide, but there are pieces that I would still like to know where they should be located. Todd Motto suggests placing them in /models, and also suggests the container components and components should be in different folders like /containers and /components in each feature. Is this how the official style guide would suggest doing it as well? I'm not entirely sold on the idea of using these folders.

Before someone mentions that ultimately it is up to a company to decide I am the one starting out in this area with no support other then these style guides and I'm not sure I like /model and /container and /components, and wanted to know what the alternatives might be so I can make an informed decision.