An AngularJS Style Guide
An AngularJS Style Guide Table of Contents 1 Angular Language Rules Manage dependencies with Closure's goog.require and goog.provide Modules Modules should reference other modules using the Angular Module's "name" property Use a common externs file JSCompiler Flags Controllers and Scopes Directives Services 2 Angular Style Rules Reserve $ for Angular properties and services Custom elements 3 Angular Tips, Tricks, and Best Practices Testing Consider using the Best Practices for App Structure Be aware of how scope inheritance works Use @ngInject for easy dependency injection compilation 4 Best practices links and docs Background This is the external version of a document that was primarily written for rkoots engineers. It describes a recommended style for AngularJS apps that use Closure, as used internally at rkoots. Members of the broader AngularJS community should feel free to apply (or not apply) these recommendations, as relevant to their own use cases. This docum...