angular-styleguide README

The project's README from github.com/johnpapa/angular-styleguide. As one markdown file: README.md.

Angular Style Guide

AI Ready

Versions

There are multiple versions of Angular, and thus there are multiple versions of the guide. Choose your guide appropriately.

Angular 1 Style Guide

The Angular 1 Style Guide.

Angular 2 Style Guide

The Angular 2 Style Guide.

Angular Team Endorsed

Special thanks to Igor Minar, lead on the Angular team, for reviewing, contributing feedback, and entrusting me to shepherd this guide.

Purpose

Opinionated Angular style guide for teams by @john_papa

If you are looking for an opinionated style guide for syntax, conventions, and structuring Angular applications, then step right in. These styles are based on my development experience with Angular, presentations, Pluralsight training courses and working in teams.

The purpose of this style guide is to provide guidance on building Angular applications by showing the conventions I use and, more importantly, why I choose them.

If you like this guide, check out my Angular Patterns: Clean Code course at Pluralsight which is a companion to this guide.

Angular Patterns: Clean Code

Community Awesomeness and Credit

Never work in a vacuum. I find that the Angular community is an incredible group who are passionate about sharing experiences. Many of my styles have been from the many pair programming sessions Ward Bell and I have had. My most excellent friend Ward has helped influence the ultimate evolution of these guides.

Contributing

Open an issue first to discuss potential changes/additions. If you have questions with the guide, feel free to leave them as issues in the repository. If you find a typo, create a pull request. The idea is to keep the content up to date and use github’s native feature to help tell the story with issues and PR’s, which are all searchable via google. Why? Because odds are if you have a question, someone else does too! You can learn more here at about how to contribute.

By contributing to this repository you are agreeing to make your content available subject to the license of this repository.

Process

1. Discuss the changes in a GitHub issue.
2. Open a Pull Request, reference the issue, and explain the change and why it adds value.
3. The Pull Request will be evaluated and either merged or declined.

License

tldr; Use this guide. Attributions are appreciated.

Copyright (c) 2014-2016 John Papa

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Back to top

angular-styleguide (johnpapa/angular-styleguide)

Searching Database…

这是什么?一份带有明确主张的 Angular 风格指南:由 John Papa 为开发团队编写的文档化规范,涵盖语法、项目结构以及 Angular 应用的构建方式。
这是我要往项目里添加的工具,还是一份阅读用的指南?是用来读的,不是软件:这个仓库本身就是指南,是一套配有示例和解释的规范。不需要安装任何东西,也不用往项目里添加任何东西。
这是 Angular 官方的风格指南吗?不是——这是 John Papa 个人带有主观倾向的见解,并非官方规则。不过 Angular 团队曾为其背书:团队负责人 Igor Minar 审阅过这份指南并提供了反馈。
它是面向个人开发者还是整个团队?主要面向希望 Angular 代码保持一致性的团队,不过任何 Angular 开发者都可以参考。这些实践来自真实的团队工作、演讲以及 Pluralsight 培训课程。
我可以把它复制过来作为我们团队自己规范的基础吗?可以——它采用 MIT 许可证,README 里自己的 TL;DR 写着:'Use this guide. Attributions are appreciated.'(欢迎使用这份指南,如能注明出处将不胜感激。)
这份指南覆盖 Angular 的哪些版本?两代都有:仓库里分别有一份 Angular 1 风格指南和一份 Angular 2 风格指南,并会告诉你根据你的应用选择对应的那一份。
这里的 'opinionated'(带有主张的)是什么意思?意思是它立场明确:它不是把所有可能的做法都列一遍,而是展示 John Papa 实际使用的规范,更重要的是解释他为什么选择每一种做法。
有没有配套的课程?有——README 推荐了 John Papa 在 Pluralsight 上的 'Angular Patterns: Clean Code' 课程,作为这份指南的配套内容。
这些规范是从哪里来的?来自作者在 Angular 方面的实际工作经验:演讲、Pluralsight 培训课程,以及与 Ward Bell 的多次结对编程。README 也把 Ward Bell 列为对这两份指南有重要影响的人。
Creator
johnpapa
Size
4.3 MB
Stars
23.6K
Updated
CommitApr 30
Age
12y
Commits · 90 Days