2019-04-02 00:12:55 -06:00
< h1 class = "no-toc" > Introduction to the Angular Docs< / h1 >
2017-04-25 14:48:01 -07:00
2020-02-05 12:08:32 +08:00
< h1 class = "no-toc" > Angular 文档简介< / h1 >
2018-03-07 14:35:57 +08:00
2020-02-18 10:14:48 -08:00
Angular is an application design framework and development platform for creating efficient and sophisticated single-page apps.
2017-04-25 14:48:01 -07:00
2020-02-05 12:08:32 +08:00
Angular 是一个应用设计框架与开发平台,用于创建高效、复杂、精致的单页面应用。
2020-02-18 10:14:48 -08:00
These Angular docs help you learn and use the Angular framework and development platform, from your first application to optimizing complex single-page apps for enterprises.
2020-01-08 12:18:18 -08:00
Tutorials and guides include downloadable examples to accelerate your projects.
2017-04-25 14:48:01 -07:00
2020-02-05 12:08:32 +08:00
这份 Angular 文档会帮助你学习和使用 Angular 框架与开发平台,从你的第一个应用开始,一直到优化复杂的企业级单页面应用。
2019-06-07 12:29:04 +08:00
这些教程和指南中都包含可下载的范例,以加速你的学习。
2017-07-30 16:52:20 +08:00
2017-05-18 21:31:27 +01:00
< div class = "card-container" >
2019-04-02 00:12:55 -06:00
< a href = "guide/setup-local" class = "docs-card"
title="Angular Local Environment Setup">
2020-02-18 10:14:48 -08:00
< section > Get Started< / section >
2019-06-07 13:37:23 +08:00
< section > 开始工作< / section >
2020-02-18 10:14:48 -08:00
< p > Set up your local environment for development with the Angular CLI.< / p >
2019-06-07 13:37:23 +08:00
< p > 使用 Angular CLI 搭建本地开发环境< / p >
2020-02-18 10:14:48 -08:00
< p class = "card-footer" > Local setup< / p >
2019-06-07 13:37:23 +08:00
< p class = "card-footer" > 开始搭建< / p >
2017-08-16 11:32:09 +01:00
< / a >
2020-02-18 10:14:48 -08:00
< a href = "guide/architecture" class = "docs-card" title = "Angular Concepts" >
< section > Learn and Explore< / section >
2019-06-07 13:37:23 +08:00
< section > 深入探索< / section >
2020-02-18 10:14:48 -08:00
< p > Learn about the fundamental design concepts and architecture of Angular apps.< / p >
2019-06-07 13:37:23 +08:00
< p > 学习 Angular 应用的更多知识及架构特性< / p >
2020-01-08 12:18:18 -08:00
< p class = "card-footer" > Introduction to Angular concepts< / p >
2018-03-08 09:28:04 +08:00
< p class = "card-footer" > 架构< / p >
2017-04-25 14:48:01 -07:00
< / a >
2020-02-18 10:14:48 -08:00
< a href = "start" class = "docs-card" title = "Try out Angular" >
< section > Take a Look< / section >
2020-06-10 16:08:05 +08:00
< section > 走马观花< / section >
2020-02-18 10:14:48 -08:00
< p > Examine and work with a small ready-made Angular app, without any setup.< / p >
2020-06-14 08:48:17 +08:00
< p > 零设置,试用一个写好的 Angular 应用程序< / p >
2020-02-18 10:14:48 -08:00
< p class = "card-footer" > Try it now< / p >
2020-06-10 16:08:05 +08:00
< p class = "card-footer" > 现在试试< / p >
2020-02-18 10:14:48 -08:00
< / a >
< a href = "tutorial" class = "docs-card" title = "Create an app" >
< section > Hello World< / section >
< p > Work through a full tutorial to create your first app.< / p >
2020-06-14 08:48:17 +08:00
< p > 一个完整教程,带你从头到尾创建首个应用< / p >
2020-02-18 10:14:48 -08:00
< p class = "card-footer" > Tour of Heroes tutorial< / p >
2020-06-10 16:08:05 +08:00
< p class = "card-footer" > 英雄指南教程< / p >
2020-02-18 10:14:48 -08:00
< / a >
2017-04-24 00:24:40 -07:00
< / div >
2019-04-02 00:12:55 -06:00
2017-04-24 00:24:40 -07:00
## Assumptions
2017-07-30 16:52:20 +08:00
## 基本假设
2020-01-08 12:18:18 -08:00
These docs assume that you are already familiar with [HTML ](https://developer.mozilla.org/docs/Learn/HTML/Introduction_to_HTML "Learn HTML" ), [CSS ](https://developer.mozilla.org/docs/Learn/CSS/First_steps "Learn CSS" ), [JavaScript ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript "Learn JavaScript" ),
and some of the tools from the [latest standards ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Language_Resources "Latest JavaScript standards" ), such as [classes ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes "ES2015 Classes" ) and [modules ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import "ES2015 Modules" ).
The code samples are written using [TypeScript ](https://www.typescriptlang.org/ "TypeScript" ).
2019-04-02 00:12:55 -06:00
Most Angular code can be written with just the latest JavaScript, using [types ](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types" ) for dependency injection, and using [decorators ](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators" ) for metadata.
2020-01-11 18:10:12 +08:00
本文档假设你已经熟悉了 [HTML ](https://developer.mozilla.org/docs/Learn/HTML/Introduction_to_HTML "Learn HTML" ), [CSS ](https://developer.mozilla.org/docs/Learn/CSS/First_steps "Learn CSS" ), [JavaScript ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript "Learn JavaScript" ) 和来自 [最新标准 ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Language_Resources "Latest JavaScript standards" ) 的一些知识,比如 [类 ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes "ES2015 Classes" ) 和 [模块 ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import "ES2015 Modules" )。
2019-01-27 22:10:45 +08:00
下列代码范例都是用最新版本的 [TypeScript ](https://www.typescriptlang.org/ "TypeScript" ) 写的。
大多数 Angular 代码都只能用最新的 JavaScript 编写,它会用 [类型 ](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types" ) 实现依赖注入,还会用[装饰器 ](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators" )来提供元数据。
2017-07-30 16:52:20 +08:00
2020-02-10 14:31:41 +08:00
## 私有化部署本文档(译者)
有些企业内部的防火墙比较严格,如果无法打开 < https: / / angular . cn > ,你可以在企业内部进行私有化部署。步骤如下:
本文档的预编译版本位于 [Github ](https://github.com/ng-docs/ng-docs.github.io ) 上,如果你想进行私有化部署,请把它 Clone 下来,在 nginx 等服务器上按照静态网站的形式做部署即可,除此之外不需要任何服务端环境。
以 Nginx 为例,你需要在 nginx 上做如下改动:
```
server {
root /path/to/ng-docs.github.io/;
location / {
try_files $uri $uri.html $uri/ /index.html;
}
}
```
注意其中的 `$uri.html` ,这是本文档相对于常规 Angular 应用的主要差别, 因为本文档进行了预先渲染( Prerender) , 这项工作可以让你在不需要 Node 服务器的情况下获得等同于服务端渲染的体验改善。
2020-01-08 12:18:18 -08:00
## Feedback
2017-04-24 00:24:40 -07:00
2017-07-30 16:52:20 +08:00
## 反馈
2019-04-02 00:12:55 -06:00
< h4 > You can sit with us!< / h4 >
2019-06-07 12:29:04 +08:00
< h4 > 你也可以和我们一起做贡献!< / h4 >
2017-04-25 14:48:01 -07:00
2019-04-02 00:12:55 -06:00
We want to hear from you. [Report problems or submit suggestions for future docs. ](https://github.com/angular/angular/issues/new/choose "Angular GitHub repository new issue form" )
2017-07-30 16:52:20 +08:00
2019-06-07 12:29:04 +08:00
我们希望听到你的声音。
2019-04-02 00:12:55 -06:00
Contribute to Angular docs by creating
2017-04-25 14:48:01 -07:00
[pull requests ](https://github.com/angular/angular/pulls "Angular Github pull requests" )
on the Angular Github repository.
2019-04-02 00:12:55 -06:00
See [Contributing to Angular ](https://github.com/angular/angular/blob/master/CONTRIBUTING.md "Contributing guide" )
2020-01-08 12:18:18 -08:00
for information about submission guidelines.
2017-07-30 16:52:20 +08:00
2019-06-07 12:29:04 +08:00
请到 Github 上的仓库中创建 [Pull Requests ](https://github.com/angular/angular/pulls "Angular Github pull requests" ) 来为 Angular 文档做出贡献。
2017-07-30 16:52:20 +08:00
[贡献者指南 ](https://github.com/angular/angular/blob/master/CONTRIBUTING.md "贡献者指南" )将会帮助你更好的为社区做贡献。
2019-06-07 12:29:04 +08:00
2019-04-02 00:12:55 -06:00
Our community values respectful, supportive communication.
Please consult and adhere to the [Code of Conduct ](https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md "Contributor code of conduct" ).
2019-06-07 12:29:04 +08:00
我们的社区提倡相互尊重、相互支持。
参见[社区行为规范 ](https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md "contributor code of conduct" )。