
AngularJS style guide used at GoCardless
## Overview
The Angular Style Guide serves as a comprehensive resource for developers looking to build maintainable and scalable applications using Angular. It emphasizes best practices and provides clear guidelines on structuring your Angular applications for optimal readability and composability. By prioritizing explicitness and forward-thinking strategies, the guide aims to enhance productivity and improve collaboration within development teams.
With a focus on a proper directory and file structure, the guide outlines how to organize components, routes, services, and constants effectively. It also highlights the importance of using third-party dependencies like SystemJS and Lodash, which can streamline development processes and help leverage modern JavaScript features.
## Features
- **Readability First**: The guide emphasizes the importance of writing code that is easy to read and understand, making it more maintainable over time.
- **Explicitness**: Encourages developers to be explicit in their coding practices to avoid confusion and enhance clarity in functionality.
- **Composable Components**: Advocates for composability over inheritance, suggesting that modular components foster better reusability and easier testing.
- **Third-party Libraries**: Utilizes libraries like Lodash and AngularUI Router to simplify common tasks and enhance application functionality.
- **Structured File Organization**: Provides a clear directory structure that helps keep components, services, and routes organized for easier navigation and management.
- **Data-Driven Routes**: Implements resolvers to ensure that all necessary data is loaded before rendering views, improving user experience.
- **Use of Constants**: Although JavaScript lacks native support for constants, the guide illustrates how to define them properly for better code clarity and consistency.
- **Helper Functions**: Promotes the use of pure helper functions to handle common tasks without side effects, thus improving code reliability and reusability.
