There are many ways one can structure an Angular app. But this is how I structure my Angular applications for extensive flexibility, scalability, and small initial bundle size.
Fig-1: Preferred Directory Structure
- Core: The things that are absolutely essential for the app to start.
- Features: Business logic. Contains modules, components, services, and other angular building blocks (if required) for a particular business feature.
- Shared: Components so dumb that it hurts!
- Pages: Routed components with lazy loaded modules.
#typescript #angular #javascript #web-development