Establish a shared set of coding conventions for your team building AngularJS 1.x applications
Refactor an existing AngularJS codebase toward component-based patterns to prepare for an Angular 2 migration
Onboard new developers to a team that maintains AngularJS apps using a documented, agreed-upon style
This repository is a style guide for building web applications with AngularJS 1.x, the older version of the Angular JavaScript framework. AngularJS is a tool for building interactive web pages that update dynamically without reloading the browser. A style guide in this context is not about visual design: it is a set of conventions and recommendations for how to organize code so that a team can work on it consistently and scale it without it becoming hard to maintain. The guide was written to align AngularJS 1.5+ projects with the patterns that Angular 2 and later versions use, making it easier to migrate an existing codebase forward in the future. The central idea is component-based architecture, which means breaking the application into small, self-contained pieces (components) rather than organizing code by type (all controllers together, all services together). Each component owns its own logic, template, styles, and tests. The guide covers: how to structure modules and files on disk, how to write components, how data should flow between parent and child components (one direction only, using events to pass information back up), how to write directives and services, how to handle application routing, and how to use modern JavaScript (ES2015 classes and modules) with AngularJS. Each section includes explanation of the reasoning behind the recommendation and code examples showing what the pattern looks like in practice. The guide also touches on tooling and state management. It was written by Todd Motto, who also runs an Angular training platform. It is aimed at development teams who want a shared starting point rather than having each developer apply their own conventions.
← toddmotto on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.